usb: host: Print device name when scanning
PATCH 1/1 usb: host: Print device name when scanning
--- 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
Signature · 1 line
2.19.1
PATCH 1/1 usb: host: Print device name when scanning
Quoted 20 lines · Ismael Luceno Cortes
Signed-off-by Ismael Luceno <[email protected]>--- 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 Signature · 1 line
2.19.1
Ping.
PATCH 1/1 usb: host: Print device name when scanning
Quoted 18 lines · Ismael Luceno Cortes
Quoted 17 lines · Ismael Luceno Cortes
Signed-off-by Ismael Luceno <[email protected]>--- 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++;
Quoted 5 lines
Quoted 3 lines
drivers/usb/host/usb-uclass.c +0
-0#ifdef CONFIG_SANDBOX Signature · 1 line
2.19.1Ping.
What is this patch doing ? The commit description doesn't explain anything about it.
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 usb: host: Print device name when scanning
Quoted 19 lines · Marek Vasut
Quoted 18 lines · Ismael Luceno Cortes
Quoted 17 lines · Ismael Luceno Cortes
Signed-off-by Ismael Luceno <[email protected]>--- 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++;
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
drivers/usb/host/usb-uclass.c +0
-0#ifdef CONFIG_SANDBOX Signature · 1 line
2.19.1Ping.
What is this patch doing ? The commit description doesn't explain anything about it.
It prints the host device name. I'm not sure the count is at all useful given there's a name...
PATCH 1/1 usb: host: Print device name when scanning
Quoted 26 lines · Ismael Luceno Cortes
Quoted 25 lines · Marek Vasut
Quoted 23 lines · Ismael Luceno Cortes
Quoted 20 lines · Ismael Luceno Cortes
Signed-off-by Ismael Luceno <[email protected]>--- 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 Signature · 1 line
2.19.1Ping.
Quoted 5 lines
Quoted 2 lines
What is this patch doing ? The commit description doesn't explain anything about it.
It prints the host device name. I'm not sure the count is at all useful given there's a name...
If you could share the log before and after to better illustrate the difference, that'd be nice.
However, shouldn't the same approach be applied to 'usb tree' subcommand and possibly others ?
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 usb: host: Print device name when scanning
Quoted 27 lines · Marek Vasut
Quoted 26 lines · Ismael Luceno Cortes
Quoted 25 lines · Marek Vasut
Quoted 23 lines · Ismael Luceno Cortes
Quoted 20 lines · Ismael Luceno Cortes
Signed-off-by Ismael Luceno <[email protected]>--- 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 Signature · 1 line
2.19.1Ping.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
What is this patch doing ? The commit description doesn't explain anything about it.
It prints the host device name. I'm not sure the count is at all useful given there's a name...
If you could share the log before and after to better illustrate the difference, that'd be nice.
unpatched:
=> usb reset
resetting USB...
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:
=> usb reset
resetting USB...
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
Quoted 2 lines
However, shouldn't the same approach be applied to 'usb tree' subcommand and possibly others ?
The number shown during usb scanning is not used nor saved anywhere else, so seems pretty useless and a special case.
OTOH the number used in the usb tree command is taken from struct usb_device, and is used for lookups.
The name is only relevant to non-discoverable devices at the moment.
dm tree shows:
... ehci_generic | |-- usb at ee080100 ... usb_hub | | `-- usb_hub ... usb_mass_storage | | `-- usb_mass_storage ... usb_storage_blk | | `-- usb_mass_storage.lun0
PATCH 1/1 usb: host: Print device name when scanning
Quoted 53 lines · Ismael Luceno Cortes
Quoted 27 lines · Marek Vasut
Quoted 26 lines · Ismael Luceno Cortes
Quoted 25 lines · Marek Vasut
Quoted 23 lines · Ismael Luceno Cortes
Quoted 20 lines · Ismael Luceno Cortes
Signed-off-by Ismael Luceno <[email protected]>--- 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 Signature · 1 line
2.19.1Ping.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
What is this patch doing ? The commit description doesn't explain anything about it.
It prints the host device name. I'm not sure the count is at all useful given there's a name...
If you could share the log before and after to better illustrate the difference, that'd be nice.
unpatched:
=> usb reset
resetting USB...
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:
=> usb reset
resetting USB...
USB0(usb atee080100): USB EHCI 1.10
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Quoted 5 lines
Quoted 2 lines
However, shouldn't the same approach be applied to 'usb tree' subcommand and possibly others ?
The number shown during usb scanning is not used nor saved anywhere else, so seems pretty useless and a special case.
What about usb part ? That one uses the number somehow I think ?
Quoted 2 lines
OTOH the number used in the usb tree command is taken from struct
usb_device, and is used for lookups.
Maybe it's time to clean that numbering mess up a bit , and make it consistent ?
Quoted 8 lines
The name is only relevant to non-discoverable devices at the moment.
dm tree shows:
... ehci_generic | |-- usb at ee080100 ... usb_hub | | `-- usb_hub ... usb_mass_storage | | `-- usb_mass_storage ... usb_storage_blk | | `-- usb_mass_storage.lun0
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 usb: host: Print device name when scanning
Quoted 54 lines · Marek Vasut
Quoted 53 lines · Ismael Luceno Cortes
Quoted 27 lines · Marek Vasut
Quoted 26 lines · Ismael Luceno Cortes
Quoted 25 lines · Marek Vasut
Quoted 23 lines · Ismael Luceno Cortes
Quoted 20 lines · Ismael Luceno Cortes
Signed-off-by Ismael Luceno <[email protected]>--- 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 Signature · 1 line
2.19.1Ping.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
What is this patch doing ? The commit description doesn't explain anything about it.
It prints the host device name. I'm not sure the count is at all useful given there's a name...
If you could share the log before and after to better illustrate the difference, that'd be nice.
unpatched:
=> usb reset
resetting USB...
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:
=> usb reset
resetting USB...
USB0(usb atee080100): USB EHCI 1.10
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
However, shouldn't the same approach be applied to 'usb tree' subcommand and possibly others ?
The number shown during usb scanning is not used nor saved anywhere else, so seems pretty useless and a special case.
What about usb part ? That one uses the number somehow I think ?
Not this number.
Quoted 5 lines
Quoted 2 lines
OTOH the number used in the usb tree command is taken from struct
usb_device, and is used for lookups.Maybe it's time to clean that numbering mess up a bit , and make it consistent ?
Maybe implement it like a vfs? It would force some consistency into the drivers and commands.
PATCH 1/1 usb: host: Print device name when scanning
Quoted 58 lines · Ismael Luceno Cortes
Quoted 57 lines · Marek Vasut
Quoted 56 lines · Ismael Luceno Cortes
Quoted 27 lines · Marek Vasut
Quoted 26 lines · Ismael Luceno Cortes
Quoted 25 lines · Marek Vasut
Quoted 23 lines · Ismael Luceno Cortes
Quoted 20 lines · Ismael Luceno Cortes
Signed-off-by Ismael Luceno <[email protected]>--- 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 Signature · 1 line
2.19.1Ping.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
What is this patch doing ? The commit description doesn't explain anything about it.
It prints the host device name. I'm not sure the count is at all useful given there's a name...
If you could share the log before and after to better illustrate the difference, that'd be nice.
unpatched:
=> usb reset
resetting USB...
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:
=> usb reset
resetting USB...
USB0(usb atee080100): USB EHCI 1.10
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) foundQuoted 2 lines
However, shouldn't the same approach be applied to 'usb tree' subcommand and possibly others ?
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
The number shown during usb scanning is not used nor saved anywhere else, so seems pretty useless and a special case.
What about usb part ? That one uses the number somehow I think ?
Not this number.
Lovely.
Anyway, this looks good, can you repost this patch with proper commit message, ideally with the example output above so I can pick it for next ?
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
OTOH the number used in the usb tree command is taken from struct
usb_device, and is used for lookups.Maybe it's time to clean that numbering mess up a bit , and make it consistent ?
Maybe implement it like a vfs? It would force some consistency into the drivers and commands.
Do you want to take that one up ? :)
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 usb: host: Print device name when scanning
Quoted 62 lines · Marek Vasut
Quoted 61 lines · Ismael Luceno Cortes
Quoted 60 lines · Marek Vasut
Quoted 58 lines · Ismael Luceno Cortes
Quoted 27 lines · Marek Vasut
Quoted 26 lines · Ismael Luceno Cortes
Quoted 25 lines · Marek Vasut
Quoted 23 lines · Ismael Luceno Cortes
Quoted 20 lines · Ismael Luceno Cortes
Signed-off-by Ismael Luceno <[email protected]>--- 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 Signature · 1 line
2.19.1Ping.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
What is this patch doing ? The commit description doesn't explain anything about it.
It prints the host device name. I'm not sure the count is at all useful given there's a name...
If you could share the log before and after to better illustrate the difference, that'd be nice.
unpatched:
=> usb reset
resetting USB...
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:
=> usb reset
resetting USB...
USB0(usb atee080100): USB EHCI 1.10
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) foundQuoted 2 lines
However, shouldn't the same approach be applied to 'usb tree' subcommand and possibly others ?
The number shown during usb scanning is not used nor saved anywhere else, so seems pretty useless and a special case.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
What about usb part ? That one uses the number somehow I think ?
Not this number.
Lovely.
Anyway, this looks good, can you repost this patch with proper commit message, ideally with the example output above so I can pick it for next ?
Ok.
Quoted 10 lines
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
OTOH the number used in the usb tree command is taken from struct
usb_device, and is used for lookups.Maybe it's time to clean that numbering mess up a bit , and make it consistent ?
Maybe implement it like a vfs? It would force some consistency into the drivers and commands.
Do you want to take that one up ? :)
I would consider implementing it. Is there any preferences?
PATCH 1/1 usb: host: Print device name when scanning
Quoted 80 lines · Ismael Luceno Cortes
Quoted 62 lines · Marek Vasut
Quoted 61 lines · Ismael Luceno Cortes
Quoted 60 lines · Marek Vasut
Quoted 58 lines · Ismael Luceno Cortes
Quoted 27 lines · Marek Vasut
Quoted 26 lines · Ismael Luceno Cortes
Quoted 25 lines · Marek Vasut
Quoted 23 lines · Ismael Luceno Cortes
Quoted 20 lines · Ismael Luceno Cortes
Signed-off-by Ismael Luceno <[email protected]>--- 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 Signature · 1 line
2.19.1Ping.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
What is this patch doing ? The commit description doesn't explain anything about it.
It prints the host device name. I'm not sure the count is at all useful given there's a name...
If you could share the log before and after to better illustrate the difference, that'd be nice.
unpatched:
=> usb reset
resetting USB...
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:
=> usb reset
resetting USB...
USB0(usb atee080100): USB EHCI 1.10
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) foundQuoted 2 lines
However, shouldn't the same approach be applied to 'usb tree' subcommand and possibly others ?
The number shown during usb scanning is not used nor saved anywhere else, so seems pretty useless and a special case.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
What about usb part ? That one uses the number somehow I think ?
Not this number.
Lovely.
Anyway, this looks good, can you repost this patch with proper commit message, ideally with the example output above so I can pick it for next ?
Ok.
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
OTOH the number used in the usb tree command is taken from struct
usb_device, and is used for lookups.Maybe it's time to clean that numbering mess up a bit , and make it consistent ?
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Maybe implement it like a vfs? It would force some consistency into the drivers and commands.
Do you want to take that one up ? :)
I would consider implementing it. Is there any preferences?
Prepare an RFC patchset and we'll see how that looks :)
Signature · 2 lines
Best regards, Marek Vasut