Commit 1ad3d225 authored by Doug Berger's avatar Doug Berger Committed by David S. Miller

net: bcmgenet: correct MIB access of UniMAC RUNT counters

The gap between the Tx status counters and the Rx RUNT counters is now
being added to allow correct reporting of the registers.

Fixes: 1c1008c7 ("net: bcmgenet: add main driver file")
Signed-off-by: default avatarDoug Berger <opendmb@gmail.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ffff7132
...@@ -876,13 +876,16 @@ static void bcmgenet_update_mib_counters(struct bcmgenet_priv *priv) ...@@ -876,13 +876,16 @@ static void bcmgenet_update_mib_counters(struct bcmgenet_priv *priv)
case BCMGENET_STAT_NETDEV: case BCMGENET_STAT_NETDEV:
case BCMGENET_STAT_SOFT: case BCMGENET_STAT_SOFT:
continue; continue;
case BCMGENET_STAT_MIB_RX:
case BCMGENET_STAT_MIB_TX:
case BCMGENET_STAT_RUNT: case BCMGENET_STAT_RUNT:
if (s->type != BCMGENET_STAT_MIB_RX) offset += BCMGENET_STAT_OFFSET;
offset = BCMGENET_STAT_OFFSET; /* fall through */
case BCMGENET_STAT_MIB_TX:
offset += BCMGENET_STAT_OFFSET;
/* fall through */
case BCMGENET_STAT_MIB_RX:
val = bcmgenet_umac_readl(priv, val = bcmgenet_umac_readl(priv,
UMAC_MIB_START + j + offset); UMAC_MIB_START + j + offset);
offset = 0; /* Reset Offset */
break; break;
case BCMGENET_STAT_MISC: case BCMGENET_STAT_MISC:
if (GENET_IS_V1(priv)) { if (GENET_IS_V1(priv)) {
......
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