]> git.hungrycats.org Git - linux/commit
net: phy: Clean the phy_ports after unregistering the downstream SFP bus
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Thu, 4 Jun 2026 09:28:17 +0000 (11:28 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 9 Jun 2026 00:43:27 +0000 (17:43 -0700)
commit4497f5028675b7e51c4aa59c3f4df01f29424277
tree3e30857ffcb3b2dbc5d9fc7db96442604a42185d
parentb1e780bb37c641d8291c51d7b4bde33450d18fb4
net: phy: Clean the phy_ports after unregistering the downstream SFP bus

As reported by sashiko when looking a other patches, we need to ensure
that the downstream SFP bus gets unregistered prior to destroying the
phy_ports attached to a phy_device, as the SFP code may reference these
ports. Let's make sure we follow that ordering in phy_remove().

Fixes: 589e934d2735 ("net: phy: Introduce PHY ports representation")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Link: https://patch.msgid.link/20260604092819.723505-4-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phy_device.c