usb: host: Print device name when scanning
PATCH v2 1/1 usb: host: Print device name when scanning
The name assigned to the USB host controller interface is a better indicator than the counter currently in use (which has no meaning other than being the order in which the interface is found).
Example of the original output:
Quoted 3 lines
USB0: USB EHCI 1.10
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Patched output:
Quoted 3 lines
USB0(usb at
ee080100): USB EHCI 1.10
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
---
Notes:
Changes since v1:
- Improved commit message.
drivers/usb/host/usb-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/usb-uclass.c +1 -1
@@ -255,7 +255,7 @@ int usb_init(void) uclass_foreach_dev(bus, uc) {/* init low_level USB */ -printf ("USB%d: " , count); +printf ("USB%d(%s): " , count, bus->name); count++;#ifdef CONFIG_SANDBOX
base-commit: 9ba5e5bc261a16f51662490da0cf620dc7f29013
Signature · 1 line
2.19.1
PATCH v2 1/1 usb: host: Print device name when scanning
Quoted 29 lines · Ismael Luceno Cortes
The name assigned to the USB host controller interface is a better indicator than the counter currently in use (which has no meaning other than being the order in which the interface is found).
Example of the original output:
Quoted 3 lines
USB0: USB EHCI 1.10
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) foundPatched output:
Quoted 3 lines
USB0(usb at
ee080100): USB EHCI 1.10
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) foundSigned-off-by Ismael Luceno <[email protected]>---
Notes:
Changes since v1:
- Improved commit message.drivers/usb/host/usb-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/host/usb-uclass.c +0
-0
drivers/usb/host/usb-uclass.c int usb_init(void) · line 259
Quoted 6 lines
drivers/usb/host/usb-uclass.c +1
-1@@ -255,7 +255,7 @@ int usb_init(void) uclass_foreach_dev(bus, uc) {/* init low_level USB */ -printf ("USB%d: " , count); +printf ("USB%d(%s): " , count, bus->name); count++;
Hmmm, why dont we just drop the count altogether then ?
The output would then be:
USB %s: USB EHCI...
scanning bus %s for devices...
for %s being the bus->name.
With the improved commit message, this would actually make sense. Does that make sense to you too or am I missing something ?
Quoted 4 lines
drivers/usb/host/usb-uclass.c +0
-0#ifdef CONFIG_SANDBOX base-commit:
9ba5e5bc261a16f51662490da0cf620dc7f29013
Signature · 2 lines
Best regards, Marek Vasut