From: Rafał Miłecki Date: Wed, 10 Mar 2021 12:51:59 +0000 (+0100) Subject: net: dsa: bcm_sf2: use 2 Gbps IMP port link on BCM4908 X-Git-Tag: Ubuntu-5.13.0-19.19~3664^2~74 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=8373a0fe9c7160a55482effa8a3f725efd3f8434;p=mirror_ubuntu-jammy-kernel.git net: dsa: bcm_sf2: use 2 Gbps IMP port link on BCM4908 BCM4908 uses 2 Gbps link between switch and the Ethernet interface. Without this BCM4908 devices were able to achieve only 2 x ~895 Mb/s. This allows handling e.g. NAT traffic with 940 Mb/s. Signed-off-by: Rafał Miłecki Acked-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c index f277df922fcd..4dedd6e0b11b 100644 --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c @@ -114,7 +114,10 @@ static void bcm_sf2_imp_setup(struct dsa_switch *ds, int port) /* Force link status for IMP port */ reg = core_readl(priv, offset); reg |= (MII_SW_OR | LINK_STS); - reg &= ~GMII_SPEED_UP_2G; + if (priv->type == BCM4908_DEVICE_ID) + reg |= GMII_SPEED_UP_2G; + else + reg &= ~GMII_SPEED_UP_2G; core_writel(priv, reg, offset); /* Enable Broadcast, Multicast, Unicast forwarding to IMP port */