From: nick black <dankamongmen@gmail.com>
To: linux-usb@vger.kernel.org
Cc: nick black <dankamongmen@gmail.com>
Subject: [PATCH] usb: always print reset/new device message
Date: Mon, 18 Mar 2024 01:25:23 -0400 [thread overview]
Message-ID: <20240318052600.671908-1-dankamongmen@gmail.com> (raw)
Since usb_speed_string() always returns a valid string
(invalid speeds turn into "UNKNOWN"), go ahead and
always print this diagnostic, rather than checking the
speed here (which wasn't up to date for SPEED_SUPER_PLUS,
and looks like it had an off-by-one error anyway).
Signed-off-by: nick black <dankamongmen@gmail.com>
---
drivers/usb/core/hub.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index e38a4124f610..7325e5420900 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -4909,11 +4909,10 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1,
else
driver_name = udev->bus->sysdev->driver->name;
- if (udev->speed < USB_SPEED_SUPER)
- dev_info(&udev->dev,
- "%s %s USB device number %d using %s\n",
- (initial ? "new" : "reset"), speed,
- devnum, driver_name);
+ dev_info(&udev->dev,
+ "%s %s USB device number %d using %s\n",
+ (initial ? "new" : "reset"), speed,
+ devnum, driver_name);
if (initial) {
/* Set up TT records, if needed */
--
2.43.0
next reply other threads:[~2024-03-21 8:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-18 5:25 nick black [this message]
2024-03-23 17:58 ` [PATCH] usb: always print reset/new device message Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240318052600.671908-1-dankamongmen@gmail.com \
--to=dankamongmen@gmail.com \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox