summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.de>2007-02-27 09:25:00 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2007-03-10 03:52:23 (GMT)
commit7bc4b81dedf54166e967afa8bc03c8bfeb40fd27 (patch)
treec660333b588f0f76de64c34c0f130f3aecb87132
parentd2487cb4257dafb686f682285854fe7f02ca29d8 (diff)
downloadlinux-7bc4b81dedf54166e967afa8bc03c8bfeb40fd27.tar.xz
USB: ratelimit debounce error messages
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>
-rw-r--r--drivers/usb/core/hub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 4140074..ce6c6a0 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -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);