]> err.no Git - linux-2.6/commitdiff
USB: ratelimit debounce error messages
authorOliver Neukum <oneukum@suse.de>
Tue, 27 Feb 2007 09:25:00 +0000 (10:25 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 10 Mar 2007 03:52:23 +0000 (19:52 -0800)
flaky hardware can cause a lot of debounce failed messages. To limit
the performance impact, a ratelimit should be used.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hub.c

index 41400743ce2cc85b5a173d7360b6c0066cc54b8a..ce6c6a0d44bf8bfb730d115a5f1eee3a2e09fc05 100644 (file)
@@ -2443,7 +2443,7 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
 
        if (portchange & USB_PORT_STAT_C_CONNECTION) {
                status = hub_port_debounce(hub, port1);
-               if (status < 0) {
+               if (status < 0 && printk_ratelimit()) {
                        dev_err (hub_dev,
                                "connect-debounce failed, port %d disabled\n",
                                port1);