Skip to content

Commit 976703c

Browse files
vladimirolteankuba-moo
authored andcommitted
net: dsa: sja1105: reorder sja1105_reload_cbs() and phylink_replay_link_end()
Move phylink_replay_link_end() as the last locked operation under sja1105_static_config_reload(). The purpose is to be able to goto this step from the error path of intermediate steps (we must call phylink_replay_link_end()). sja1105_reload_cbs() notably does not depend on port states or link speeds. See commit 954ad9b ("net: dsa: sja1105: fix bandwidth discrepancy between tc-cbs software and offload") which has discussed this issue specifically. Signed-off-by: Vladimir Oltean <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 0cc0c2e commit 976703c

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/net/dsa/sja1105/sja1105_main.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2339,13 +2339,11 @@ int sja1105_static_config_reload(struct sja1105_private *priv,
23392339
goto out;
23402340
}
23412341

2342+
rc = sja1105_reload_cbs(priv);
2343+
23422344
dsa_switch_for_each_available_port(dp, ds)
23432345
if (dp->pl)
23442346
phylink_replay_link_end(dp->pl);
2345-
2346-
rc = sja1105_reload_cbs(priv);
2347-
if (rc < 0)
2348-
goto out;
23492347
out:
23502348
mutex_unlock(&priv->mgmt_lock);
23512349
mutex_unlock(&priv->fdb_lock);

0 commit comments

Comments
 (0)