Skip to contentSkip to conversation

net: systemport: Correct IPG length settings

PATCH Superseded Florian Fainelli 1 participant 2 messages Oct 28, 2017

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: systemport: Correct IPG length settings

Due to a documentation mistake, the IPG length was set to 0x12 while it should have been 12 (decimal). This would affect short packet (64B typically) performance since the IPG was bigger than necessary.

Fixes 44a4524c54af ("net: systemport: Add support for SYSTEMPORT Lite")
---
 drivers/net/ethernet/broadcom/bcmsysport.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bcmsysport.c +3 -1
index 83eec9a8c275..7c51332eb3d9 100644
@@ -1811,11 +1811,13 @@ static inline void gib_set_pad_extension(struct bcm_sysport_priv *priv)
 {
 	u32 __maybe_unused reg;
 
-	/* Include Broadcom tag in pad extension */
+	/* Include Broadcom tag in pad extension and fix up IPG_LENGTH */
 	if (netdev_uses_dsa(priv->netdev)) {
 		reg = gib_readl(priv, GIB_CONTROL);
 		reg &= ~(GIB_PAD_EXTENSION_MASK << GIB_PAD_EXTENSION_SHIFT);
 		reg |= ENET_BRCM_TAG_LEN << GIB_PAD_EXTENSION_SHIFT;
+		reg &= ~(GIB_IPG_LEN_MASK << GIB_IPG_LEN_SHIFT);
+		reg |= 12 << GIB_IPG_LEN_SHIFT;
 		gib_writel(priv, reg, GIB_CONTROL);
 	}
 }
Signature · 1 line
2.9.3
#1 lore raw
Quoted 4 lines · Florian Fainelli

Due to a documentation mistake, the IPG length was set to 0x12 while it should have been 12 (decimal). This would affect short packet (64B typically) performance since the IPG was bigger than necessary.

David, I will be sending a v2 which moves the IPG fix outside of the netdev_uses_dsa() clause since that is independent, unlike the GIB extension. Thanks!

Signature · 1 line
Florian