Skip to contentSkip to conversation

net: dsa: bcm_sf2: use 2 Gbps IMP port link on BCM4908

PATCH Applied Rafał Miłecki 3 participants 3 messages Mar 10, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dsa: bcm_sf2: use 2 Gbps IMP port link on BCM4908

From: Rafał Miłecki <[email protected]>

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.

---
 drivers/net/dsa/bcm_sf2.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/dsa/bcm_sf2.c +4 -1
index 7583fc12a9d7..d183206c4bb4 100644
@@ -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 */
Signature · 1 line
2.26.2
#2 lore raw
In reply to Rafał Miłecki
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

Quoted 9 lines · On Wed, 10 Mar 2021 13:51:59 +0100 you wrote:

From: Rafał Miłecki <[email protected]>

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.

[...]

Here is the summary with links:
- net: dsa: bcm_sf2: use 2 Gbps IMP port link on BCM4908

    https://git.kernel.org/netdev/net/c/8373a0fe9c71

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html