b44: Ratelimit timeout error message.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jochen Friedrich 2010-02-12 10:11:54 +00:00 committed by David S. Miller
parent 47d742752d
commit f6ca057f1b
1 changed files with 7 additions and 5 deletions

View 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;