Commit 7a4d7467 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'further-sja1105-phylink-link-replay-fixups'

Vladimir Oltean says:

====================
Further SJA1105 phylink link replay fixups

While I was playing around with the subsystem knowledge in Chris Mason's
review-prompts to see what LLMs would have needed to catch the bug
behind commit bfd264fb ("net: dsa: sja1105: protect link replay
helpers against NULL phylink instance"), it flagged another issue
instead, which IMO is valid. This is being fixed in patch 2/2.
Patch 1/2 is preparatory reordering for that.

I haven't noticed any physical issues, it only has to do with the
soundness of the new call path introduced in January in commit
0b2edc53 ("net: dsa: sja1105: let phylink help with the replay of
link callbacks").
====================

Link: https://patch.msgid.link/20260304220900.3865120-1-vladimir.oltean@nxp.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 0cc0c2e6 ce2da643
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -2339,14 +2339,13 @@ int sja1105_static_config_reload(struct sja1105_private *priv,
			goto out;
	}

	rc = sja1105_reload_cbs(priv);

out:
	dsa_switch_for_each_available_port(dp, ds)
		if (dp->pl)
			phylink_replay_link_end(dp->pl);

	rc = sja1105_reload_cbs(priv);
	if (rc < 0)
		goto out;
out:
	mutex_unlock(&priv->mgmt_lock);
	mutex_unlock(&priv->fdb_lock);