diff options
author | Alexander Stein <alexander.stein@systec-electronic.com> | 2011-04-13 01:03:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-13 14:50:08 -0400 |
commit | b19f7f71b6fa5e0c49f65082044b8a2ff1009f00 (patch) | |
tree | 2b203a34682332c7b291681e00bb2113fce2b5f2 /drivers/net/macb.c | |
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>
Diffstat (limited to 'drivers/net/macb.c')
-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) | |||
576 | * add that if/when we get our hands on a full-blown MII PHY. | 576 | * add that if/when we get our hands on a full-blown MII PHY. |
577 | */ | 577 | */ |
578 | 578 | ||
579 | if (status & MACB_BIT(ISR_ROVR)) { | ||
580 | /* We missed at least one packet */ | ||
581 | bp->hw_stats.rx_overruns++; | ||
582 | } | ||
583 | |||
579 | if (status & MACB_BIT(HRESP)) { | 584 | if (status & MACB_BIT(HRESP)) { |
580 | /* | 585 | /* |
581 | * TODO: Reset the hardware, and maybe move the printk | 586 | * 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) | |||
1024 | hwstat->rx_jabbers + | 1029 | hwstat->rx_jabbers + |
1025 | hwstat->rx_undersize_pkts + | 1030 | hwstat->rx_undersize_pkts + |
1026 | hwstat->rx_length_mismatch); | 1031 | hwstat->rx_length_mismatch); |
1027 | nstat->rx_over_errors = hwstat->rx_resource_errors; | 1032 | nstat->rx_over_errors = hwstat->rx_resource_errors + |
1033 | hwstat->rx_overruns; | ||
1028 | nstat->rx_crc_errors = hwstat->rx_fcs_errors; | 1034 | nstat->rx_crc_errors = hwstat->rx_fcs_errors; |
1029 | nstat->rx_frame_errors = hwstat->rx_align_errors; | 1035 | nstat->rx_frame_errors = hwstat->rx_align_errors; |
1030 | nstat->rx_fifo_errors = hwstat->rx_overruns; | 1036 | nstat->rx_fifo_errors = hwstat->rx_overruns; |