* [PATCH] usbnet: ratelimit warning messages invoked from callback handler
@ 2009-05-27 16:40 André Goddard Rosa
2009-05-30 5:14 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: André Goddard Rosa @ 2009-05-27 16:40 UTC (permalink / raw)
To: petkan; +Cc: shemminger, dbrownell, davem, netdev
[-- Attachment #1: Type: text/plain, Size: 64 bytes --]
Hi,
please cc: me as I'm not subscribed.
Thank you,
Andre
[-- Attachment #2: rtl8150_ratelimit_messages.patch --]
[-- Type: text/x-diff, Size: 1652 bytes --]
commit 9db992ae115c58dc457bc2b1e6fad03252552747
Author: André Goddard Rosa <andre.goddard@gmail.com>
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.
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c
index f9fb454..fcc6fa0 100644
--- a/drivers/net/usb/rtl8150.c
+++ b/drivers/net/usb/rtl8150.c
@@ -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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usbnet: ratelimit warning messages invoked from callback handler
2009-05-27 16:40 [PATCH] usbnet: ratelimit warning messages invoked from callback handler André Goddard Rosa
@ 2009-05-30 5:14 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-05-30 5:14 UTC (permalink / raw)
To: andre.goddard; +Cc: petkan, shemminger, dbrownell, netdev
From: André Goddard Rosa <andre.goddard@gmail.com>
Date: Wed, 27 May 2009 13:40:44 -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.
>
> Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
>
Applied to net-next-2.6, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-30 5:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-27 16:40 [PATCH] usbnet: ratelimit warning messages invoked from callback handler André Goddard Rosa
2009-05-30 5:14 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).