r8169: fix printk_ratelimit in the interrupt handler
authorFrancois Romieu <romieu@electric-eye.fr.zoreil.com>
Wed, 16 Nov 2005 22:44:05 +0000 (23:44 +0100)
committerFrancois Romieu <romieu@electric-eye.fr.zoreil.com>
Wed, 16 Nov 2005 22:44:05 +0000 (23:44 +0100)
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>
drivers/net/r8169.c

index 159b56a56ef49112fc5e58083c76a3066eb76958..bda6095f3120c9ead2625d3658d4176b0be3124d 100644 (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);
                }