diff options
author | Alexander Stein <alexander.stein@systec-electronic.com> | 2011-04-13 05:03:24 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-13 11:50:08 -0700 |
commit | b19f7f71b6fa5e0c49f65082044b8a2ff1009f00 (patch) | |
tree | 2b203a34682332c7b291681e00bb2113fce2b5f2 | |
parent | 8b5933c380fc66a6311739f9b36a812383f82141 (diff) |
macb: Add rx overrun counter
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/macb.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 2cb4e792f871..629bd2649c0c 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -576,6 +576,11 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id) * add that if/when we get our hands on a full-blown MII PHY. */ + if (status & MACB_BIT(ISR_ROVR)) { + /* We missed at least one packet */ + bp->hw_stats.rx_overruns++; + } + if (status & MACB_BIT(HRESP)) { /* * TODO: Reset the hardware, and maybe move the printk @@ -1024,7 +1029,8 @@ static struct net_device_stats *macb_get_stats(struct net_device *dev) hwstat->rx_jabbers + hwstat->rx_undersize_pkts + hwstat->rx_length_mismatch); - nstat->rx_over_errors = hwstat->rx_resource_errors; + nstat->rx_over_errors = hwstat->rx_resource_errors + + hwstat->rx_overruns; nstat->rx_crc_errors = hwstat->rx_fcs_errors; nstat->rx_frame_errors = hwstat->rx_align_errors; nstat->rx_fifo_errors = hwstat->rx_overruns; |