]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: sja1105: completely error out in sja1105_static_config_reload if something...
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 18 Jun 2021 13:48:12 +0000 (16:48 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Jun 2021 19:26:17 +0000 (12:26 -0700)
commitcf72d0171e56758cc9a4d0ff100e59d82756063e
tree627c6f5d95cc3744ee7085006ba8d12076786fdb
parent5dccb19f7101f223c48c3aba86f9a0d80e1a0bb9
net: dsa: sja1105: completely error out in sja1105_static_config_reload if something fails

If reloading the static config fails for whatever reason, for example if
sja1105_static_config_check_valid() fails, then we "goto out_unlock_ptp"
but we print anyway that "Reset switch and programmed static config.",
which is confusing because we didn't. We also do a bunch of other stuff
like reprogram the XPCS and reload the credit-based shapers, as if a
switch reset took place, which didn't.

So just unlock the PTP lock and goto out, skipping all of that.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/sja1105/sja1105_main.c