mirror of
https://github.com/torvalds/linux.git
synced 2024-11-01 09:41:44 +00:00
usbnet: ratelimit warning messages invoked from callback handler
Warning messages coming from rtl8150 driver can flood the console and make a DTV/set-top-box unable to decode video/audio frames. 'Pegasus' driver handles this situation similarly, preventing this from happening there. It happens with a low cost BCM MIPS embedded platform, whenever timeout errors were coming from usbnet device, making platform unusable for viewer watching. Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
6442330734
commit
342a437ef6
@ -221,7 +221,8 @@ static void ctrl_callback(struct urb *urb)
|
||||
case -ENOENT:
|
||||
break;
|
||||
default:
|
||||
dev_warn(&urb->dev->dev, "ctrl urb status %d\n", status);
|
||||
if (printk_ratelimit())
|
||||
dev_warn(&urb->dev->dev, "ctrl urb status %d\n", status);
|
||||
}
|
||||
dev = urb->context;
|
||||
clear_bit(RX_REG_SET, &dev->flags);
|
||||
@ -442,10 +443,12 @@ static void read_bulk_callback(struct urb *urb)
|
||||
case -ENOENT:
|
||||
return; /* the urb is in unlink state */
|
||||
case -ETIME:
|
||||
dev_warn(&urb->dev->dev, "may be reset is needed?..\n");
|
||||
if (printk_ratelimit())
|
||||
dev_warn(&urb->dev->dev, "may be reset is needed?..\n");
|
||||
goto goon;
|
||||
default:
|
||||
dev_warn(&urb->dev->dev, "Rx status %d\n", status);
|
||||
if (printk_ratelimit())
|
||||
dev_warn(&urb->dev->dev, "Rx status %d\n", status);
|
||||
goto goon;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user