summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.de>2007-02-27 10:25:00 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2007-03-09 19:52:23 -0800
commit7bc4b81dedf54166e967afa8bc03c8bfeb40fd27 (patch)
treec660333b588f0f76de64c34c0f130f3aecb87132 /drivers/usb
parentd2487cb4257dafb686f682285854fe7f02ca29d8 (diff)
downloadlinux-7bc4b81dedf54166e967afa8bc03c8bfeb40fd27.tar.gz
linux-7bc4b81dedf54166e967afa8bc03c8bfeb40fd27.tar.bz2
linux-7bc4b81dedf54166e967afa8bc03c8bfeb40fd27.zip
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>
Diffstat (limited to 'drivers/usb')
-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 41400743ce2c..ce6c6a0d44bf 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);