summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton2007-08-10 23:05:23 +0200
committerJeff Garzik2007-08-14 07:36:39 +0200
commitc76720cf7ba63a3d179b6da8675653c8b01b6c0b (patch)
treeefc02af3ea5a5487042fc5528a4898e9ec4993a5
parentax88796 printk fixes (diff)
downloadkernel-qcow2-linux-c76720cf7ba63a3d179b6da8675653c8b01b6c0b.tar.gz
kernel-qcow2-linux-c76720cf7ba63a3d179b6da8675653c8b01b6c0b.tar.xz
kernel-qcow2-linux-c76720cf7ba63a3d179b6da8675653c8b01b6c0b.zip
natsemi: fix netdev error acounting
When a detailed netdev error is counted, we also must account for it in the aggregated error count. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=8106 Cc: Tim Hockin <thockin@hockin.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: Chongfeng Hu <loveminix@yahoo.com.cn> Cc: Natalie Protasevich <protasnb@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/net/natsemi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 6bb48ba80964..b47a12d684f9 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -2438,13 +2438,16 @@ static void netdev_error(struct net_device *dev, int intr_status)
dev->name);
}
np->stats.rx_fifo_errors++;
+ np->stats.rx_errors++;
}
/* Hmmmmm, it's not clear how to recover from PCI faults. */
if (intr_status & IntrPCIErr) {
printk(KERN_NOTICE "%s: PCI error %#08x\n", dev->name,
intr_status & IntrPCIErr);
np->stats.tx_fifo_errors++;
+ np->stats.tx_errors++;
np->stats.rx_fifo_errors++;
+ np->stats.rx_errors++;
}
spin_unlock(&np->lock);
}