6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jonas Gorski [ Upstream commit 1237c2d4a8db79dfd4369bff6930b0e385ed7d5c ] BCM63xx internal switches do not support EEE, but provide multiple RGMII ports where external PHYs may be connected. If one of these PHYs are EEE capable, we may try to enable EEE for the MACs, which then hangs the system on access of the (non-existent) EEE registers. Fix this by checking if the switch actually supports EEE before attempting to configure it. Fixes: 22256b0afb12 ("net: dsa: b53: Move EEE functions to b53") Reviewed-by: Florian Fainelli Tested-by: Álvaro Fernández Rojas Signed-off-by: Jonas Gorski Link: https://patch.msgid.link/20250602193953.1010487-2-jonas.gorski@gmail.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- drivers/net/dsa/b53/b53_common.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index f8b34fa8b99ee..41961e3809b20 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -2268,8 +2268,12 @@ EXPORT_SYMBOL(b53_eee_enable_set); */ int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy) { + struct b53_device *dev = ds->priv; int ret; + if (is5325(dev) || is5365(dev) || is63xx(dev)) + return 0; + ret = phy_init_eee(phy, false); if (ret) return 0; @@ -2286,7 +2290,7 @@ int b53_get_mac_eee(struct dsa_switch *ds, int port, struct ethtool_eee *e) struct ethtool_eee *p = &dev->ports[port].eee; u16 reg; - if (is5325(dev) || is5365(dev)) + if (is5325(dev) || is5365(dev) || is63xx(dev)) return -EOPNOTSUPP; b53_read16(dev, B53_EEE_PAGE, B53_EEE_LPI_INDICATE, ®); @@ -2302,7 +2306,7 @@ int b53_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_eee *e) struct b53_device *dev = ds->priv; struct ethtool_eee *p = &dev->ports[port].eee; - if (is5325(dev) || is5365(dev)) + if (is5325(dev) || is5365(dev) || is63xx(dev)) return -EOPNOTSUPP; p->eee_enabled = e->eee_enabled; -- 2.53.0