]> git.baikalelectronics.ru Git - kernel.git/commit
net: systemport: fix software maintained statistics
authorFlorian Fainelli <f.fainelli@gmail.com>
Sun, 1 Mar 2015 02:09:17 +0000 (18:09 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Mar 2015 19:02:11 +0000 (14:02 -0500)
commit5f7d0d8950fc11f5ed490162862ff2c65b293c60
tree7c5b4a3d35b7e0deac03d2691a636c76d1ca8b65
parent717c34182a8bcfca1ebf3e54200a8e4ffae2b156
net: systemport: fix software maintained statistics

Commit 1ad50b67f3b7 ("net: systemport: log RX buffer allocation and RX/TX DMA
failures") added a few software maintained statistics using
BCM_SYSPORT_STAT_MIB_RX and BCM_SYSPORT_STAT_MIB_TX. These statistics are read
from the hardware MIB counters, such that bcm_sysport_update_mib_counters() was
trying to read from a non-existing MIB offset for these counters.

Fix this by introducing a special type: BCM_SYSPORT_STAT_SOFT, similar to
BCM_SYSPORT_STAT_NETDEV, such that bcm_sysport_get_ethtool_stats will read from
the software mib.

Fixes: 1ad50b67f3b7 ("net: systemport: log RX buffer allocation and RX/TX DMA failures")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bcmsysport.c
drivers/net/ethernet/broadcom/bcmsysport.h