From: Oliver Neukum Date: Tue, 27 Feb 2007 09:25:00 +0000 (+0100) Subject: USB: ratelimit debounce error messages X-Git-Tag: v2.6.21-rc4~54^2~15 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7bc4b81dedf54166e967afa8bc03c8bfeb40fd27;p=karo-tx-linux.git 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 Signed-off-by: Greg Kroah-Hartman --- 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);