usbnet: ratelimit warning messages invoked from callback handler
Subsystems (4)
PATCH 1/1 usbnet: ratelimit warning messages invoked from callback handler
Hi,
please cc: me as I'm not subscribed.
Thank you,
Andre
commit 9db992ae115c58dc457bc2b1e6fad03252552747
Author: André Goddard Rosa <[email protected]> Date: Wed May 27 10:22:55 2009 -0300
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.
drivers/net/usb/rtl8150.c +6 -3
@@ -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; }
From: André Goddard Rosa <[email protected]>
Date: Wed, 27 May 2009 13:40:44 -0300
Quoted 5 lines
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.
Quoted 9 lines
'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 <[email protected]>
Applied to net-next-2.6, thanks.