Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'net-dsa-b53-fix-bcm63xx-rgmii-user-ports-with-speed-1g'

Jonas Gorski says:

====================
net: dsa: b53: fix bcm63xx rgmii user ports with speed < 1g

It seems that the integrated switch in bcm63xx does not support polling
external PHYs for link configuration. While the appropriate registers
seem to exist with expected content, changing them does nothing.

This results in user ports with external PHYs only working in 1000/fd,
and not in other modes, despite linking up.

Fix this by writing the link result into the port state override
register, like we already do for fixed links.

With this, ports with lower speeds can successfully transmit and receive
packets.

This also aligns the behaviour with the old bcm63xx_enetsw driver for
those ports.
====================

Link: https://patch.msgid.link/20251101132807.50419-1-jonas.gorski@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+20 -1
+20 -1
drivers/net/dsa/b53/b53_common.c
··· 1372 1372 else 1373 1373 reg &= ~PORT_OVERRIDE_FULL_DUPLEX; 1374 1374 1375 + reg &= ~(0x3 << GMII_PO_SPEED_S); 1376 + if (is5301x(dev) || is58xx(dev)) 1377 + reg &= ~PORT_OVERRIDE_SPEED_2000M; 1378 + 1375 1379 switch (speed) { 1376 1380 case 2000: 1377 1381 reg |= PORT_OVERRIDE_SPEED_2000M; ··· 1393 1389 dev_err(dev->dev, "unknown speed: %d\n", speed); 1394 1390 return; 1395 1391 } 1392 + 1393 + if (is5325(dev)) 1394 + reg &= ~PORT_OVERRIDE_LP_FLOW_25; 1395 + else 1396 + reg &= ~(PORT_OVERRIDE_RX_FLOW | PORT_OVERRIDE_TX_FLOW); 1396 1397 1397 1398 if (rx_pause) { 1398 1399 if (is5325(dev)) ··· 1602 1593 struct b53_device *dev = dp->ds->priv; 1603 1594 int port = dp->index; 1604 1595 1605 - if (mode == MLO_AN_PHY) 1596 + if (mode == MLO_AN_PHY) { 1597 + if (is63xx(dev) && in_range(port, B53_63XX_RGMII0, 4)) 1598 + b53_force_link(dev, port, false); 1606 1599 return; 1600 + } 1607 1601 1608 1602 if (mode == MLO_AN_FIXED) { 1609 1603 b53_force_link(dev, port, false); ··· 1634 1622 if (mode == MLO_AN_PHY) { 1635 1623 /* Re-negotiate EEE if it was enabled already */ 1636 1624 p->eee_enabled = b53_eee_init(ds, port, phydev); 1625 + 1626 + if (is63xx(dev) && in_range(port, B53_63XX_RGMII0, 4)) { 1627 + b53_force_port_config(dev, port, speed, duplex, 1628 + tx_pause, rx_pause); 1629 + b53_force_link(dev, port, true); 1630 + } 1631 + 1637 1632 return; 1638 1633 } 1639 1634