Commit 93824c80 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

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: 44a4524c ("net: systemport: Add support for SYSTEMPORT Lite")
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3b117750
...@@ -1809,15 +1809,17 @@ static inline void bcm_sysport_mask_all_intrs(struct bcm_sysport_priv *priv) ...@@ -1809,15 +1809,17 @@ static inline void bcm_sysport_mask_all_intrs(struct bcm_sysport_priv *priv)
static inline void gib_set_pad_extension(struct bcm_sysport_priv *priv) static inline void gib_set_pad_extension(struct bcm_sysport_priv *priv)
{ {
u32 __maybe_unused reg; u32 reg;
/* Include Broadcom tag in pad extension */
if (netdev_uses_dsa(priv->netdev)) {
reg = gib_readl(priv, GIB_CONTROL); reg = gib_readl(priv, GIB_CONTROL);
/* Include Broadcom tag in pad extension and fix up IPG_LENGTH */
if (netdev_uses_dsa(priv->netdev)) {
reg &= ~(GIB_PAD_EXTENSION_MASK << GIB_PAD_EXTENSION_SHIFT); reg &= ~(GIB_PAD_EXTENSION_MASK << GIB_PAD_EXTENSION_SHIFT);
reg |= ENET_BRCM_TAG_LEN << GIB_PAD_EXTENSION_SHIFT; reg |= ENET_BRCM_TAG_LEN << GIB_PAD_EXTENSION_SHIFT;
gib_writel(priv, reg, GIB_CONTROL);
} }
reg &= ~(GIB_IPG_LEN_MASK << GIB_IPG_LEN_SHIFT);
reg |= 12 << GIB_IPG_LEN_SHIFT;
gib_writel(priv, reg, GIB_CONTROL);
} }
static int bcm_sysport_open(struct net_device *dev) static int bcm_sysport_open(struct net_device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment