Commit c76720cf authored by Andrew Morton's avatar Andrew Morton Committed by Jeff Garzik

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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent b4efe22c
...@@ -2438,13 +2438,16 @@ static void netdev_error(struct net_device *dev, int intr_status) ...@@ -2438,13 +2438,16 @@ static void netdev_error(struct net_device *dev, int intr_status)
dev->name); dev->name);
} }
np->stats.rx_fifo_errors++; np->stats.rx_fifo_errors++;
np->stats.rx_errors++;
} }
/* Hmmmmm, it's not clear how to recover from PCI faults. */ /* Hmmmmm, it's not clear how to recover from PCI faults. */
if (intr_status & IntrPCIErr) { if (intr_status & IntrPCIErr) {
printk(KERN_NOTICE "%s: PCI error %#08x\n", dev->name, printk(KERN_NOTICE "%s: PCI error %#08x\n", dev->name,
intr_status & IntrPCIErr); intr_status & IntrPCIErr);
np->stats.tx_fifo_errors++; np->stats.tx_fifo_errors++;
np->stats.tx_errors++;
np->stats.rx_fifo_errors++; np->stats.rx_fifo_errors++;
np->stats.rx_errors++;
} }
spin_unlock(&np->lock); spin_unlock(&np->lock);
} }
......
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