linux-yocto/drivers/net/dsa
Bastien Curutchet (Schneider Electric) e7e8e9b1a1 net: dsa: microchip: Free previously initialized ports on init failures
[ Upstream commit 0f80e21bf6 ]

If a port interrupt setup fails after at least one port has already been
successfully initialized, the gotos miss some resource releasing:
- the already initialized PTP IRQs aren't released
- the already initialized port IRQs aren't released if the failure
occurs in ksz_pirq_setup().

Merge 'out_girq' and 'out_ptpirq' into a single 'port_release' label.
Behind this label, use the reverse loop to release all IRQ resources
for all initialized ports.
Jump in the middle of the reverse loop if an error occurs in
ksz_ptp_irq_setup() to only release the port IRQ of the current
iteration.

Cc: stable@vger.kernel.org
Fixes: c9cd961c0d ("net: dsa: microchip: lan937x: add interrupt support for port phy link")
Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>
Link: https://patch.msgid.link/20251120-ksz-fix-v6-4-891f80ae7f8f@bootlin.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
[ replaced dsa_switch_for_each_user_port_continue_reverse() macro with dsa_switch_for_each_port_continue_reverse() plus manual dsa_port_is_user() check ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-12-07 06:18:54 +09:00
..
b53 net: dsa: b53: stop reading ARL entries if search is done 2025-11-24 10:29:52 +01:00
hirschmann net: dsa: hellcreek: fix missing error handling in LED registration 2025-12-01 11:41:46 +01:00
microchip net: dsa: microchip: Free previously initialized ports on init failures 2025-12-07 06:18:54 +09:00
mv88e6xxx net: dsa: mv88e6xxx: enable STU methods for 6320 family 2025-05-02 07:51:04 +02:00
ocelot net: dsa: felix: fix broken taprio gate states after clock jump 2025-05-09 09:44:01 +02:00
qca
realtek
sja1105 net: dsa: sja1105: fix SGMII linking at 10M or 100M but not passing traffic 2025-12-07 06:18:49 +09:00
xrs700x
bcm_sf2_cfp.c
bcm_sf2_regs.h
bcm_sf2.c
bcm_sf2.h
dsa_loop_bdinfo.c
dsa_loop.c net: phy: fixed_phy: let fixed_phy_unregister free the phy_device 2025-11-24 10:29:30 +01:00
dsa_loop.h
Kconfig
lan9303_i2c.c
lan9303_mdio.c
lan9303-core.c
lan9303.h
lantiq_gswip.c net: dsa: lantiq_gswip: suppress -EINVAL errors for bridge FDB entries added to the CPU port 2025-10-02 13:42:51 +02:00
lantiq_pce.h
Makefile
mt7530-mdio.c
mt7530-mmio.c
mt7530.c net: dsa: mt7530: sync driver-specific behavior of MT7531 variants 2025-05-02 07:50:44 +02:00
mt7530.h
mv88e6060.c
mv88e6060.h
rzn1_a5psw.c
rzn1_a5psw.h
vitesse-vsc73xx-core.c
vitesse-vsc73xx-platform.c
vitesse-vsc73xx-spi.c
vitesse-vsc73xx.h