linux/drivers/net/dsa/sja1105
Vladimir Oltean ce2da643f0 net: dsa: sja1105: ensure phylink_replay_link_end() will not be missed
Most errors that can occur in sja1105_static_config_reload() are fatal
(example: fail to communicate with hardware), but not all are.

For example, sja1105_static_config_upload() -> kcalloc() may fail, and
if that happens, we have called phylink_replay_link_begin() but never
phylink_replay_link_end().

Under that circumstance, all port phylink instances are left in a state
where the resolver is stopped with the PHYLINK_DISABLE_REPLAY bit set.
We have effectively disabled link management with no way to recover from
this condition.

Avoid that situation by ensuring phylink_replay_link_begin() is always
paired with phylink_replay_link_end(), regardless of whether we faced
any errors during switch reset, configuration reload and general state
reload.

Fixes: 0b2edc531e ("net: dsa: sja1105: let phylink help with the replay of link callbacks")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20260304220900.3865120-3-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-06 17:48:01 -08:00
..
Kconfig
Makefile
sja1105_clocking.c net: dsa: sja1105: make read-only const arrays static 2023-09-21 16:12:12 +02:00
sja1105_devlink.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
sja1105_dynamic_config.c net: dsa: sja1105: fix multicast forwarding working only for last added mdb entry 2023-09-11 08:32:30 +01:00
sja1105_dynamic_config.h
sja1105_ethtool.c net: dsa: sja1105: fix displaced ethtool statistics counters 2025-03-24 15:20:23 -07:00
sja1105_flower.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sja1105_main.c net: dsa: sja1105: ensure phylink_replay_link_end() will not be missed 2026-03-06 17:48:01 -08:00
sja1105_mdio.c net: dsa: sja1105: Use of_get_available_child_by_name() 2025-02-07 13:43:55 +00:00
sja1105_ptp.c net: dsa: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() 2025-05-09 16:34:09 -07:00
sja1105_ptp.h net: dsa: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() 2025-05-09 16:34:09 -07:00
sja1105_spi.c net: dsa: sja1105: complete tc-cbs offload support on SJA1110 2023-09-06 06:23:05 +01:00
sja1105_static_config.c net: dsa: sja1105: fix kasan out-of-bounds warning in sja1105_table_delete_entry() 2025-03-24 15:20:23 -07:00
sja1105_static_config.h
sja1105_tas.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sja1105_tas.h
sja1105_vl.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
sja1105_vl.h
sja1105.h net: dsa: sja1105: use phylink_pcs internally 2024-10-02 17:32:00 -07:00