Skip to content

Commit 1237c2d

Browse files
KanjiMonsterPaolo Abeni
authored andcommitted
net: dsa: b53: do not enable EEE on bcm63xx
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: 22256b0 ("net: dsa: b53: Move EEE functions to b53") Reviewed-by: Florian Fainelli <[email protected]> Tested-by: Álvaro Fernández Rojas <[email protected]> Signed-off-by: Jonas Gorski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 919d763 commit 1237c2d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/net/dsa/b53/b53_common.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2353,6 +2353,9 @@ int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy)
23532353
{
23542354
int ret;
23552355

2356+
if (!b53_support_eee(ds, port))
2357+
return 0;
2358+
23562359
ret = phy_init_eee(phy, false);
23572360
if (ret)
23582361
return 0;
@@ -2367,7 +2370,7 @@ bool b53_support_eee(struct dsa_switch *ds, int port)
23672370
{
23682371
struct b53_device *dev = ds->priv;
23692372

2370-
return !is5325(dev) && !is5365(dev);
2373+
return !is5325(dev) && !is5365(dev) && !is63xx(dev);
23712374
}
23722375
EXPORT_SYMBOL(b53_support_eee);
23732376

0 commit comments

Comments
 (0)