Skip to content

Commit

Permalink
USB: ratelimit debounce error messages
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Mar 10, 2007
1 parent d2487cb commit 7bc4b81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7bc4b81

Please sign in to comment.