Skip to content

Commit 93824c8

Browse files
ffainellidavem330
authored andcommitted
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: 44a4524 ("net: systemport: Add support for SYSTEMPORT Lite") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 3b11775 commit 93824c8

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

drivers/net/ethernet/broadcom/bcmsysport.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,15 +1809,17 @@ static inline void bcm_sysport_mask_all_intrs(struct bcm_sysport_priv *priv)
18091809

18101810
static inline void gib_set_pad_extension(struct bcm_sysport_priv *priv)
18111811
{
1812-
u32 __maybe_unused reg;
1812+
u32 reg;
18131813

1814-
/* Include Broadcom tag in pad extension */
1814+
reg = gib_readl(priv, GIB_CONTROL);
1815+
/* Include Broadcom tag in pad extension and fix up IPG_LENGTH */
18151816
if (netdev_uses_dsa(priv->netdev)) {
1816-
reg = gib_readl(priv, GIB_CONTROL);
18171817
reg &= ~(GIB_PAD_EXTENSION_MASK << GIB_PAD_EXTENSION_SHIFT);
18181818
reg |= ENET_BRCM_TAG_LEN << GIB_PAD_EXTENSION_SHIFT;
1819-
gib_writel(priv, reg, GIB_CONTROL);
18201819
}
1820+
reg &= ~(GIB_IPG_LEN_MASK << GIB_IPG_LEN_SHIFT);
1821+
reg |= 12 << GIB_IPG_LEN_SHIFT;
1822+
gib_writel(priv, reg, GIB_CONTROL);
18211823
}
18221824

18231825
static int bcm_sysport_open(struct net_device *dev)

0 commit comments

Comments
 (0)