b44: Ratelimit timeout error message.
authorJochen Friedrich <jochen@scram.de>
Fri, 12 Feb 2010 10:11:54 +0000 (10:11 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Feb 2010 08:03:27 +0000 (00:03 -0800)
Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/b44.c

index 9091c6574b1cfa435feff9f37006b547aa32a8f0..f21cbe63c7b17c6f7238184ac4ac05bfe67c9903 100644 (file)
@@ -189,11 +189,13 @@ static int b44_wait_bit(struct b44 *bp, unsigned long reg,
                udelay(10);
        }
        if (i == timeout) {
-               printk(KERN_ERR PFX "%s: BUG!  Timeout waiting for bit %08x of register "
-                      "%lx to %s.\n",
-                      bp->dev->name,
-                      bit, reg,
-                      (clear ? "clear" : "set"));
+               if (net_ratelimit())
+                       printk(KERN_ERR PFX "%s: BUG!  Timeout waiting for bit "
+                              "%08x of register "
+                              "%lx to %s.\n",
+                              bp->dev->name,
+                              bit, reg,
+                              (clear ? "clear" : "set"));
                return -ENODEV;
        }
        return 0;