netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v1 1/1] net: phy: micrel: ksz8081: disable broadcast only if PHY address is not 0
@ 2024-06-27  5:33 Oleksij Rempel
  2024-06-27 13:56 ` Andrew Lunn
  2024-06-27 21:57 ` Jakub Kicinski
  0 siblings, 2 replies; 4+ messages in thread
From: Oleksij Rempel @ 2024-06-27  5:33 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Oleksij Rempel, stable, kernel, linux-kernel, Russell King,
	netdev, Lukasz Majewski

Do not disable broadcast if we are using address 0 (broadcast) to
communicate with this device. Otherwise we will use proper driver but no
communication will be possible and no link changes will be detected.
There are two scenarios where we can run in to this situation:
- PHY is bootstrapped for address 0
- no PHY address is known and linux is scanning the MDIO bus, so first
  respond and attached device will be on address 0.

The fixes tag points to the latest refactoring, not to the initial point
where kszphy_broadcast_disable() was introduced.

Fixes: 79e498a9c7da0 ("net: phy: micrel: Restore led_mode and clk_sel on resume")
Cc: stable@vger.kernel.org
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 drivers/net/phy/micrel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 81c20eb4b54b9..67c2e611150d2 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -590,7 +590,7 @@ static int kszphy_config_init(struct phy_device *phydev)
 
 	type = priv->type;
 
-	if (type && type->has_broadcast_disable)
+	if (type && type->has_broadcast_disable && phydev->mdio.addr != 0)
 		kszphy_broadcast_disable(phydev);
 
 	if (type && type->has_nand_tree_disable)
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-27 21:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-27  5:33 [PATCH net v1 1/1] net: phy: micrel: ksz8081: disable broadcast only if PHY address is not 0 Oleksij Rempel
2024-06-27 13:56 ` Andrew Lunn
2024-06-27 16:51   ` Oleksij Rempel
2024-06-27 21:57 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).