From 7bc4b81dedf54166e967afa8bc03c8bfeb40fd27 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Tue, 27 Feb 2007 10:25:00 +0100 Subject: [PATCH] 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 --- drivers/usb/core/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);