From: Oliver Neukum Date: Fri, 5 Jun 2026 09:00:58 +0000 (+0200) Subject: USB: core: ratelimit cabling message X-Git-Tag: v7.2-rc3~5^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6df47500b557e01737eef6f6b07b12f97a35d841;p=thirdparty%2Fkernel%2Flinux.git USB: core: ratelimit cabling message If a cable is bad, it stays bad. There is no need to flood the log with messages about it. So go for a ratelimited version. Signed-off-by: Oliver Neukum Link: https://patch.msgid.link/20260605090110.1514785-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 24960ba9caa9..5262e11c12cd 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -3148,7 +3148,7 @@ static int hub_port_reset(struct usb_hub *hub, int port1, delay = HUB_LONG_RESET_TIME; } - dev_err(&port_dev->dev, "Cannot enable. Maybe the USB cable is bad?\n"); + dev_err_ratelimited(&port_dev->dev, "Cannot enable. Maybe the USB cable is bad?\n"); done: if (status == 0) {