2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-18 18:23:53 +08:00

r8169: fix printk_ratelimit in the interrupt handler

I keep on getting "printk: N messages suppressed" messages.  We need to test
netif_msg_intr() _before_ running printk_ratelimit(), because the latter
updates state.

Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
This commit is contained in:
Francois Romieu 2005-11-16 23:44:05 +01:00
parent 0db169f970
commit 7c8b2eb4c7

View File

@ -2516,7 +2516,7 @@ rtl8169_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
} while (boguscnt > 0);
if (boguscnt <= 0) {
if (net_ratelimit() && netif_msg_intr(tp)) {
if (netif_msg_intr(tp) && net_ratelimit() ) {
printk(KERN_WARNING
"%s: Too much work at interrupt!\n", dev->name);
}