mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
net: dsa: b53: fix bcm63xx RGMII port link adjustment
BCM63XX's switch does not support MDIO scanning of external phys, so its
MACs needs to be manually configured for autonegotiated link speeds.
So b53_force_port_config() and b53_force_link() accordingly also when
mode is MLO_AN_PHY for those ports.
Fixes lower speeds than 1000/full on rgmii ports 4 - 7.
This aligns the behaviour with the old bcm63xx_enetsw driver for those
ports.
Fixes: 967dd82ffc ("net: dsa: b53: Add support for Broadcom RoboSwitch")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20251101132807.50419-3-jonas.gorski@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
b6a8a5477f
commit
3e4ebdc160
@@ -1602,8 +1602,11 @@ static void b53_phylink_mac_link_down(struct phylink_config *config,
|
||||
struct b53_device *dev = dp->ds->priv;
|
||||
int port = dp->index;
|
||||
|
||||
if (mode == MLO_AN_PHY)
|
||||
if (mode == MLO_AN_PHY) {
|
||||
if (is63xx(dev) && in_range(port, B53_63XX_RGMII0, 4))
|
||||
b53_force_link(dev, port, false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mode == MLO_AN_FIXED) {
|
||||
b53_force_link(dev, port, false);
|
||||
@@ -1631,6 +1634,13 @@ static void b53_phylink_mac_link_up(struct phylink_config *config,
|
||||
if (mode == MLO_AN_PHY) {
|
||||
/* Re-negotiate EEE if it was enabled already */
|
||||
p->eee_enabled = b53_eee_init(ds, port, phydev);
|
||||
|
||||
if (is63xx(dev) && in_range(port, B53_63XX_RGMII0, 4)) {
|
||||
b53_force_port_config(dev, port, speed, duplex,
|
||||
tx_pause, rx_pause);
|
||||
b53_force_link(dev, port, true);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user