linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Understanding 'lsusb -t'
@ 2024-08-30 12:14 Eyal Lebedinsky
  2024-08-30 12:32 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Eyal Lebedinsky @ 2024-08-30 12:14 UTC (permalink / raw)
  To: linux-usb

I assume that the generated list is a tree, so each leaf (Device/If) is on only one point.

I note this output:

$ lsusb -tv
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
     ID 1d6b:0002 Linux Foundation 2.0 root hub
[trimmed]
     |__ Port 004: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
[trimmed]
     |__ Port 005: Dev 006, If 0, Class=Hub, Driver=hub/4p, 480M
[trimmed]
     |__ Port 006: Dev 019, If 0, Class=Hub, Driver=hub/4p, 480M
         ID 2109:2817 VIA Labs, Inc.
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
[trimmed]
     |__ Port 006: Dev 006, If 0, Class=Hub, Driver=hub/4p, 5000M
         ID 2109:0817 VIA Labs, Inc.

I removed some content that is not relevant to my question.

Note the Bus 001.Port 006 and Bus 002.Port 006 entries.

I verified that both are for the same (one) device. They do not show when I disconnect it.
The device is an external 4-port USB3.0 hub. It is listed once as 480M and once as 5000M.
Nothing is plugged into any of the four ports.

Is this correct? Why does this device show twice in the list?

TIA

-- 
Eyal at Home (eyal@eyal.emu.id.au)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Understanding 'lsusb -t'
  2024-08-30 12:14 Understanding 'lsusb -t' Eyal Lebedinsky
@ 2024-08-30 12:32 ` Greg KH
  2024-08-30 13:41   ` Eyal Lebedinsky
                     ` (2 more replies)
  2024-08-30 14:25 ` Alan Stern
  2024-08-30 14:31 ` Michał Pecio
  2 siblings, 3 replies; 14+ messages in thread
From: Greg KH @ 2024-08-30 12:32 UTC (permalink / raw)
  To: Eyal Lebedinsky; +Cc: linux-usb

On Fri, Aug 30, 2024 at 10:14:20PM +1000, Eyal Lebedinsky wrote:
> I assume that the generated list is a tree, so each leaf (Device/If) is on only one point.
> 
> I note this output:
> 
> $ lsusb -tv
> /:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
>     ID 1d6b:0002 Linux Foundation 2.0 root hub
> [trimmed]
>     |__ Port 004: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
> [trimmed]
>     |__ Port 005: Dev 006, If 0, Class=Hub, Driver=hub/4p, 480M
> [trimmed]
>     |__ Port 006: Dev 019, If 0, Class=Hub, Driver=hub/4p, 480M
>         ID 2109:2817 VIA Labs, Inc.
> /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
> [trimmed]
>     |__ Port 006: Dev 006, If 0, Class=Hub, Driver=hub/4p, 5000M
>         ID 2109:0817 VIA Labs, Inc.
> 
> I removed some content that is not relevant to my question.
> 
> Note the Bus 001.Port 006 and Bus 002.Port 006 entries.
> 
> I verified that both are for the same (one) device. They do not show when I disconnect it.
> The device is an external 4-port USB3.0 hub. It is listed once as 480M and once as 5000M.
> Nothing is plugged into any of the four ports.
> 
> Is this correct? Why does this device show twice in the list?

That's odd, as the same device shouldn't be on multiple busses.  Busses
are a "root port" on the system (i.e. a new PCI controller device), so
are you sure you just don't have multiple devices with the same
device/vendor id?

What is the diff between running the command before and after removing a
single device?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Understanding 'lsusb -t'
  2024-08-30 12:32 ` Greg KH
@ 2024-08-30 13:41   ` Eyal Lebedinsky
  2024-08-30 13:43     ` Eyal Lebedinsky
  2024-08-30 13:55   ` Eyal Lebedinsky
  2024-08-30 14:07   ` Eyal Lebedinsky
  2 siblings, 1 reply; 14+ messages in thread
From: Eyal Lebedinsky @ 2024-08-30 13:41 UTC (permalink / raw)
  To: linux-usb

On 30/8/24 10:32 pm, Greg KH wrote:
> On Fri, Aug 30, 2024 at 10:14:20PM +1000, Eyal Lebedinsky wrote:
>> I assume that the generated list is a tree, so each leaf (Device/If) is on only one point.
>>
>> I note this output:
>>
>> $ lsusb -tv
>> /:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
>>      ID 1d6b:0002 Linux Foundation 2.0 root hub
>> [trimmed]
>>      |__ Port 004: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
>> [trimmed]
>>      |__ Port 005: Dev 006, If 0, Class=Hub, Driver=hub/4p, 480M
>> [trimmed]
>>      |__ Port 006: Dev 019, If 0, Class=Hub, Driver=hub/4p, 480M
>>          ID 2109:2817 VIA Labs, Inc.
>> /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
>> [trimmed]
>>      |__ Port 006: Dev 006, If 0, Class=Hub, Driver=hub/4p, 5000M
>>          ID 2109:0817 VIA Labs, Inc.
>>
>> I removed some content that is not relevant to my question.
>>
>> Note the Bus 001.Port 006 and Bus 002.Port 006 entries.
>>
>> I verified that both are for the same (one) device. They do not show when I disconnect it.
>> The device is an external 4-port USB3.0 hub. It is listed once as 480M and once as 5000M.
>> Nothing is plugged into any of the four ports.
>>
>> Is this correct? Why does this device show twice in the list?
> 
> That's odd, as the same device shouldn't be on multiple busses.  Busses
> are a "root port" on the system (i.e. a new PCI controller device), so
> are you sure you just don't have multiple devices with the same
> device/vendor id?

The hub is on an extension cable, and I just unplug it the hub.

> What is the diff between running the command before and after removing a
> single device?

$ lsusb -tv >lsusb-all.log
$ lsusb -tv >lsusb-less.log
$ diff -u lsusb-all.log lsusb-less.log
--- lsusb-all.log       2024-08-30 23:39:09.782062079 +1000
+++ lsusb-less.log      2024-08-30 23:39:22.608987407 +1000
@@ -48,8 +48,6 @@
              ID 0c45:7401 Microdia TEMPer Temperature Sensor
          |__ Port 004: Dev 018, If 1, Class=Human Interface Device, Driver=[none], 1.5M
              ID 0c45:7401 Microdia TEMPer Temperature Sensor
-    |__ Port 006: Dev 019, If 0, Class=Hub, Driver=hub/4p, 480M
-        ID 2109:2817 VIA Labs, Inc.
  /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
      ID 1d6b:0003 Linux Foundation 3.0 root hub
      |__ Port 004: Dev 002, If 0, Class=Hub, Driver=hub/4p, 5000M
@@ -58,5 +56,3 @@
              ID 0bda:0411 Realtek Semiconductor Corp. Hub
      |__ Port 005: Dev 003, If 0, Class=Hub, Driver=hub/4p, 5000M
          ID 05e3:0612 Genesys Logic, Inc. Hub
-    |__ Port 006: Dev 006, If 0, Class=Hub, Driver=hub/4p, 5000M
-        ID 2109:0817 VIA Labs, Inc.

> thanks,
> 
> greg k-h

-- 
Eyal at Home (eyal@eyal.emu.id.au)


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Understanding 'lsusb -t'
  2024-08-30 13:41   ` Eyal Lebedinsky
@ 2024-08-30 13:43     ` Eyal Lebedinsky
  2024-08-30 14:27       ` Greg KH
  0 siblings, 1 reply; 14+ messages in thread
From: Eyal Lebedinsky @ 2024-08-30 13:43 UTC (permalink / raw)
  To: linux-usb

On 30/8/24 11:41 pm, Eyal Lebedinsky wrote:
> On 30/8/24 10:32 pm, Greg KH wrote:
>> On Fri, Aug 30, 2024 at 10:14:20PM +1000, Eyal Lebedinsky wrote:
>>> I assume that the generated list is a tree, so each leaf (Device/If) is on only one point.
>>>
>>> I note this output:
>>>
>>> $ lsusb -tv
>>> /:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
>>>      ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> [trimmed]
>>>      |__ Port 004: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
>>> [trimmed]
>>>      |__ Port 005: Dev 006, If 0, Class=Hub, Driver=hub/4p, 480M
>>> [trimmed]
>>>      |__ Port 006: Dev 019, If 0, Class=Hub, Driver=hub/4p, 480M
>>>          ID 2109:2817 VIA Labs, Inc.
>>> /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
>>> [trimmed]
>>>      |__ Port 006: Dev 006, If 0, Class=Hub, Driver=hub/4p, 5000M
>>>          ID 2109:0817 VIA Labs, Inc.
>>>
>>> I removed some content that is not relevant to my question.
>>>
>>> Note the Bus 001.Port 006 and Bus 002.Port 006 entries.
>>>
>>> I verified that both are for the same (one) device. They do not show when I disconnect it.
>>> The device is an external 4-port USB3.0 hub. It is listed once as 480M and once as 5000M.
>>> Nothing is plugged into any of the four ports.
>>>
>>> Is this correct? Why does this device show twice in the list?
>>
>> That's odd, as the same device shouldn't be on multiple busses.  Busses
>> are a "root port" on the system (i.e. a new PCI controller device), so
>> are you sure you just don't have multiple devices with the same
>> device/vendor id?
> 
> The hub is on an extension cable, and I just unplug it the hub.
> 
>> What is the diff between running the command before and after removing a
>> single device?
> 
> $ lsusb -tv >lsusb-all.log
> $ lsusb -tv >lsusb-less.log
> $ diff -u lsusb-all.log lsusb-less.log
> --- lsusb-all.log       2024-08-30 23:39:09.782062079 +1000
> +++ lsusb-less.log      2024-08-30 23:39:22.608987407 +1000
> @@ -48,8 +48,6 @@
>               ID 0c45:7401 Microdia TEMPer Temperature Sensor
>           |__ Port 004: Dev 018, If 1, Class=Human Interface Device, Driver=[none], 1.5M
>               ID 0c45:7401 Microdia TEMPer Temperature Sensor
> -    |__ Port 006: Dev 019, If 0, Class=Hub, Driver=hub/4p, 480M
> -        ID 2109:2817 VIA Labs, Inc.
>   /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
>       ID 1d6b:0003 Linux Foundation 3.0 root hub
>       |__ Port 004: Dev 002, If 0, Class=Hub, Driver=hub/4p, 5000M
> @@ -58,5 +56,3 @@
>               ID 0bda:0411 Realtek Semiconductor Corp. Hub
>       |__ Port 005: Dev 003, If 0, Class=Hub, Driver=hub/4p, 5000M
>           ID 05e3:0612 Genesys Logic, Inc. Hub
> -    |__ Port 006: Dev 006, If 0, Class=Hub, Driver=hub/4p, 5000M
> -        ID 2109:0817 VIA Labs, Inc.

Also, here these the log messages when I reconnect the hub:

2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 1-6: Product: USB2.0 Hub
2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 1-6: Manufacturer: VIA Labs, Inc.
2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: hub 1-6:1.0: USB hub found
2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: hub 1-6:1.0: 4 ports detected
2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 2-6: new SuperSpeed USB device number 7 using xhci_hcd
2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 2-6: New USB device found, idVendor=2109, idProduct=0817, bcdDevice= 0.50
2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 2-6: Product: USB3.0 Hub
2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 2-6: Manufacturer: VIA Labs, Inc.
2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: hub 2-6:1.0: USB hub found
2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: hub 2-6:1.0: 4 ports detected


>> thanks,
>>
>> greg k-h
> 

-- 
Eyal at Home (eyal@eyal.emu.id.au)


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Understanding 'lsusb -t'
  2024-08-30 12:32 ` Greg KH
  2024-08-30 13:41   ` Eyal Lebedinsky
@ 2024-08-30 13:55   ` Eyal Lebedinsky
  2024-08-30 14:07   ` Eyal Lebedinsky
  2 siblings, 0 replies; 14+ messages in thread
From: Eyal Lebedinsky @ 2024-08-30 13:55 UTC (permalink / raw)
  To: linux-usb

On 30/8/24 10:32 pm, Greg KH wrote:
> On Fri, Aug 30, 2024 at 10:14:20PM +1000, Eyal Lebedinsky wrote:
>> I assume that the generated list is a tree, so each leaf (Device/If) is on only one point.
>>
>> I note this output:
>>
>> $ lsusb -tv
>> /:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
>>      ID 1d6b:0002 Linux Foundation 2.0 root hub
>> [trimmed]
>>      |__ Port 004: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
>> [trimmed]
>>      |__ Port 005: Dev 006, If 0, Class=Hub, Driver=hub/4p, 480M
>> [trimmed]
>>      |__ Port 006: Dev 019, If 0, Class=Hub, Driver=hub/4p, 480M
>>          ID 2109:2817 VIA Labs, Inc.
>> /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
>> [trimmed]
>>      |__ Port 006: Dev 006, If 0, Class=Hub, Driver=hub/4p, 5000M
>>          ID 2109:0817 VIA Labs, Inc.
>>
>> I removed some content that is not relevant to my question.
>>
>> Note the Bus 001.Port 006 and Bus 002.Port 006 entries.
>>
>> I verified that both are for the same (one) device. They do not show when I disconnect it.
>> The device is an external 4-port USB3.0 hub. It is listed once as 480M and once as 5000M.
>> Nothing is plugged into any of the four ports.
>>
>> Is this correct? Why does this device show twice in the list?
> 
> That's odd, as the same device shouldn't be on multiple busses.  Busses
> are a "root port" on the system (i.e. a new PCI controller device), so
> are you sure you just don't have multiple devices with the same
> device/vendor id?
> 
> What is the diff between running the command before and after removing a
> single device?

I now attached a different 4-port usb3 hub (another brand: idVendor=2109, idProduct=0817)
and I see two devices detected (4 ports each) again, these are the new devices listed:

/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
...
     |__ Port 006: Dev 023, If 0, Class=Hub, Driver=hub/4p, 480M
         ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
...
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
...
     |__ Port 006: Dev 010, If 0, Class=Hub, Driver=hub/4p, 5000M
         ID 0bda:0411 Realtek Semiconductor Corp. Hub

> thanks,
> 
> greg k-h

-- 
Eyal at Home (eyal@eyal.emu.id.au)


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Understanding 'lsusb -t'
  2024-08-30 12:32 ` Greg KH
  2024-08-30 13:41   ` Eyal Lebedinsky
  2024-08-30 13:55   ` Eyal Lebedinsky
@ 2024-08-30 14:07   ` Eyal Lebedinsky
  2024-08-30 14:28     ` Understanding 'lsusb -t' [correction] Eyal Lebedinsky
  2024-08-30 14:28     ` Understanding 'lsusb -t' Greg KH
  2 siblings, 2 replies; 14+ messages in thread
From: Eyal Lebedinsky @ 2024-08-30 14:07 UTC (permalink / raw)
  To: linux-usb

On 30/8/24 10:32 pm, Greg KH wrote:
> On Fri, Aug 30, 2024 at 10:14:20PM +1000, Eyal Lebedinsky wrote:
>> I assume that the generated list is a tree, so each leaf (Device/If) is on only one point.
>>
>> I note this output:
>>
>> $ lsusb -tv
>> /:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
>>      ID 1d6b:0002 Linux Foundation 2.0 root hub
>> [trimmed]
>>      |__ Port 004: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
>> [trimmed]
>>      |__ Port 005: Dev 006, If 0, Class=Hub, Driver=hub/4p, 480M
>> [trimmed]
>>      |__ Port 006: Dev 019, If 0, Class=Hub, Driver=hub/4p, 480M
>>          ID 2109:2817 VIA Labs, Inc.
>> /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
>> [trimmed]
>>      |__ Port 006: Dev 006, If 0, Class=Hub, Driver=hub/4p, 5000M
>>          ID 2109:0817 VIA Labs, Inc.
>>
>> I removed some content that is not relevant to my question.
>>
>> Note the Bus 001.Port 006 and Bus 002.Port 006 entries.
>>
>> I verified that both are for the same (one) device. They do not show when I disconnect it.
>> The device is an external 4-port USB3.0 hub. It is listed once as 480M and once as 5000M.
>> Nothing is plugged into any of the four ports.
>>
>> Is this correct? Why does this device show twice in the list?
> 
> That's odd, as the same device shouldn't be on multiple busses.  Busses
> are a "root port" on the system (i.e. a new PCI controller device), so
> are you sure you just don't have multiple devices with the same
> device/vendor id?
> 
> What is the diff between running the command before and after removing a
> single device?
> 
> thanks,
> 
> greg k-h

BTW, I run a nightly log of system commands which includes lsusb.
The first time the device is listed twice is:

$ uname -a
Linux e7.eyal.emu.id.au 6.9.11-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 25 18:17:34 UTC 2024 x86_64 GNU/Linux

$ lsusb --version
lsusb (usbutils) 017

-- 
Eyal at Home (eyal@eyal.emu.id.au)


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Understanding 'lsusb -t'
  2024-08-30 12:14 Understanding 'lsusb -t' Eyal Lebedinsky
  2024-08-30 12:32 ` Greg KH
@ 2024-08-30 14:25 ` Alan Stern
  2024-08-30 14:49   ` Greg KH
  2024-08-30 14:49   ` Eyal Lebedinsky
  2024-08-30 14:31 ` Michał Pecio
  2 siblings, 2 replies; 14+ messages in thread
From: Alan Stern @ 2024-08-30 14:25 UTC (permalink / raw)
  To: Eyal Lebedinsky; +Cc: linux-usb

On Fri, Aug 30, 2024 at 10:14:20PM +1000, Eyal Lebedinsky wrote:
> I assume that the generated list is a tree, so each leaf (Device/If) is on only one point.
> 
> I note this output:
> 
> $ lsusb -tv
> /:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
>     ID 1d6b:0002 Linux Foundation 2.0 root hub
> [trimmed]
>     |__ Port 004: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
> [trimmed]
>     |__ Port 005: Dev 006, If 0, Class=Hub, Driver=hub/4p, 480M
> [trimmed]
>     |__ Port 006: Dev 019, If 0, Class=Hub, Driver=hub/4p, 480M
>         ID 2109:2817 VIA Labs, Inc.
> /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
> [trimmed]
>     |__ Port 006: Dev 006, If 0, Class=Hub, Driver=hub/4p, 5000M
>         ID 2109:0817 VIA Labs, Inc.
> 
> I removed some content that is not relevant to my question.
> 
> Note the Bus 001.Port 006 and Bus 002.Port 006 entries.
> 
> I verified that both are for the same (one) device. They do not show when I disconnect it.
> The device is an external 4-port USB3.0 hub. It is listed once as 480M and once as 5000M.
> Nothing is plugged into any of the four ports.
> 
> Is this correct? Why does this device show twice in the list?

USB 3 actually uses _two_ physical buses.  Each cable has two twisted 
pairs of wires carrying the SuperSpeed (5000 Mb/s or more) USB-3 data in 
and out, and also has two wires carrying the legacy USB-2 data (480 Mb/s 
or less) in and out.

These physical buses are represented separately in the kernel.  In your 
example, Bus 001 and Bus 002 use the same cable and the same xHCI host 
controller; Bus 001 is the legacy USB-2 bus (you can tell by the speed) 
and Bus 002 is the SuperSpeed bus.

Most devices use one or the other of those signal paths, depending on 
the speed they connect at.  But hubs have to handle both paths, because 
the devices plugged into them may want to use either one.  Therefore 
your VIA Labs hub connects to both of these buses.  That's why it 
appears twice in the output from lsusb.

Alan Stern

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Understanding 'lsusb -t'
  2024-08-30 13:43     ` Eyal Lebedinsky
@ 2024-08-30 14:27       ` Greg KH
  2024-08-30 14:33         ` Eyal Lebedinsky
  0 siblings, 1 reply; 14+ messages in thread
From: Greg KH @ 2024-08-30 14:27 UTC (permalink / raw)
  To: Eyal Lebedinsky; +Cc: linux-usb

On Fri, Aug 30, 2024 at 11:43:39PM +1000, Eyal Lebedinsky wrote:
> On 30/8/24 11:41 pm, Eyal Lebedinsky wrote:
> > On 30/8/24 10:32 pm, Greg KH wrote:
> > > On Fri, Aug 30, 2024 at 10:14:20PM +1000, Eyal Lebedinsky wrote:
> > > > I assume that the generated list is a tree, so each leaf (Device/If) is on only one point.
> > > > 
> > > > I note this output:
> > > > 
> > > > $ lsusb -tv
> > > > /:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
> > > >      ID 1d6b:0002 Linux Foundation 2.0 root hub
> > > > [trimmed]
> > > >      |__ Port 004: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
> > > > [trimmed]
> > > >      |__ Port 005: Dev 006, If 0, Class=Hub, Driver=hub/4p, 480M
> > > > [trimmed]
> > > >      |__ Port 006: Dev 019, If 0, Class=Hub, Driver=hub/4p, 480M
> > > >          ID 2109:2817 VIA Labs, Inc.
> > > > /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
> > > > [trimmed]
> > > >      |__ Port 006: Dev 006, If 0, Class=Hub, Driver=hub/4p, 5000M
> > > >          ID 2109:0817 VIA Labs, Inc.
> > > > 
> > > > I removed some content that is not relevant to my question.
> > > > 
> > > > Note the Bus 001.Port 006 and Bus 002.Port 006 entries.
> > > > 
> > > > I verified that both are for the same (one) device. They do not show when I disconnect it.
> > > > The device is an external 4-port USB3.0 hub. It is listed once as 480M and once as 5000M.
> > > > Nothing is plugged into any of the four ports.
> > > > 
> > > > Is this correct? Why does this device show twice in the list?
> > > 
> > > That's odd, as the same device shouldn't be on multiple busses.  Busses
> > > are a "root port" on the system (i.e. a new PCI controller device), so
> > > are you sure you just don't have multiple devices with the same
> > > device/vendor id?
> > 
> > The hub is on an extension cable, and I just unplug it the hub.
> > 
> > > What is the diff between running the command before and after removing a
> > > single device?
> > 
> > $ lsusb -tv >lsusb-all.log
> > $ lsusb -tv >lsusb-less.log
> > $ diff -u lsusb-all.log lsusb-less.log
> > --- lsusb-all.log       2024-08-30 23:39:09.782062079 +1000
> > +++ lsusb-less.log      2024-08-30 23:39:22.608987407 +1000
> > @@ -48,8 +48,6 @@
> >               ID 0c45:7401 Microdia TEMPer Temperature Sensor
> >           |__ Port 004: Dev 018, If 1, Class=Human Interface Device, Driver=[none], 1.5M
> >               ID 0c45:7401 Microdia TEMPer Temperature Sensor
> > -    |__ Port 006: Dev 019, If 0, Class=Hub, Driver=hub/4p, 480M
> > -        ID 2109:2817 VIA Labs, Inc.
> >   /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
> >       ID 1d6b:0003 Linux Foundation 3.0 root hub
> >       |__ Port 004: Dev 002, If 0, Class=Hub, Driver=hub/4p, 5000M
> > @@ -58,5 +56,3 @@
> >               ID 0bda:0411 Realtek Semiconductor Corp. Hub
> >       |__ Port 005: Dev 003, If 0, Class=Hub, Driver=hub/4p, 5000M
> >           ID 05e3:0612 Genesys Logic, Inc. Hub
> > -    |__ Port 006: Dev 006, If 0, Class=Hub, Driver=hub/4p, 5000M
> > -        ID 2109:0817 VIA Labs, Inc.
> 
> Also, here these the log messages when I reconnect the hub:
> 
> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 1-6: Product: USB2.0 Hub
> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 1-6: Manufacturer: VIA Labs, Inc.
> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: hub 1-6:1.0: USB hub found
> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: hub 1-6:1.0: 4 ports detected
> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 2-6: new SuperSpeed USB device number 7 using xhci_hcd
> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 2-6: New USB device found, idVendor=2109, idProduct=0817, bcdDevice= 0.50
> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 2-6: Product: USB3.0 Hub
> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 2-6: Manufacturer: VIA Labs, Inc.
> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: hub 2-6:1.0: USB hub found
> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: hub 2-6:1.0: 4 ports detected

Extension cables are very wierd, and you are right, this is two
different hubs on two ports.  Is this a thunderbolt device somehow?

Anyway, as long as everything is working properly, all should be good.

What happens when you plug a device into this cable at the other end,
does it show up twice?  Or just once?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Understanding 'lsusb -t' [correction]
  2024-08-30 14:07   ` Eyal Lebedinsky
@ 2024-08-30 14:28     ` Eyal Lebedinsky
  2024-08-30 14:28     ` Understanding 'lsusb -t' Greg KH
  1 sibling, 0 replies; 14+ messages in thread
From: Eyal Lebedinsky @ 2024-08-30 14:28 UTC (permalink / raw)
  To: linux-usb

On 31/8/24 12:07 am, Eyal Lebedinsky wrote:
> On 30/8/24 10:32 pm, Greg KH wrote:
>> On Fri, Aug 30, 2024 at 10:14:20PM +1000, Eyal Lebedinsky wrote:
>>> I assume that the generated list is a tree, so each leaf (Device/If) is on only one point.
>>>
>>> I note this output:
>>>
>>> $ lsusb -tv
>>> /:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
>>>      ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> [trimmed]
>>>      |__ Port 004: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
>>> [trimmed]
>>>      |__ Port 005: Dev 006, If 0, Class=Hub, Driver=hub/4p, 480M
>>> [trimmed]
>>>      |__ Port 006: Dev 019, If 0, Class=Hub, Driver=hub/4p, 480M
>>>          ID 2109:2817 VIA Labs, Inc.
>>> /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
>>> [trimmed]
>>>      |__ Port 006: Dev 006, If 0, Class=Hub, Driver=hub/4p, 5000M
>>>          ID 2109:0817 VIA Labs, Inc.
>>>
>>> I removed some content that is not relevant to my question.
>>>
>>> Note the Bus 001.Port 006 and Bus 002.Port 006 entries.
>>>
>>> I verified that both are for the same (one) device. They do not show when I disconnect it.
>>> The device is an external 4-port USB3.0 hub. It is listed once as 480M and once as 5000M.
>>> Nothing is plugged into any of the four ports.
>>>
>>> Is this correct? Why does this device show twice in the list?
>>
>> That's odd, as the same device shouldn't be on multiple busses.  Busses
>> are a "root port" on the system (i.e. a new PCI controller device), so
>> are you sure you just don't have multiple devices with the same
>> device/vendor id?
>>
>> What is the diff between running the command before and after removing a
>> single device?
>>
>> thanks,
>>
>> greg k-h
> 
> BTW, I run a nightly log of system commands which includes lsusb.
> The first time the device is listed twice is:
> 
> $ uname -a
> Linux e7.eyal.emu.id.au 6.9.11-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 25 18:17:34 UTC 2024 x86_64 GNU/Linux
> 
> $ lsusb --version
> lsusb (usbutils) 017

I am mistaken, this situation was there for a long time (at least 2 years).
Earlier there were bus 3 and bus 4 so I failed to notice the bus 2 port 6 report,

-- 
Eyal at Home (eyal@eyal.emu.id.au)


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Understanding 'lsusb -t'
  2024-08-30 14:07   ` Eyal Lebedinsky
  2024-08-30 14:28     ` Understanding 'lsusb -t' [correction] Eyal Lebedinsky
@ 2024-08-30 14:28     ` Greg KH
  1 sibling, 0 replies; 14+ messages in thread
From: Greg KH @ 2024-08-30 14:28 UTC (permalink / raw)
  To: Eyal Lebedinsky; +Cc: linux-usb

On Sat, Aug 31, 2024 at 12:07:32AM +1000, Eyal Lebedinsky wrote:
> On 30/8/24 10:32 pm, Greg KH wrote:
> > On Fri, Aug 30, 2024 at 10:14:20PM +1000, Eyal Lebedinsky wrote:
> > > I assume that the generated list is a tree, so each leaf (Device/If) is on only one point.
> > > 
> > > I note this output:
> > > 
> > > $ lsusb -tv
> > > /:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
> > >      ID 1d6b:0002 Linux Foundation 2.0 root hub
> > > [trimmed]
> > >      |__ Port 004: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
> > > [trimmed]
> > >      |__ Port 005: Dev 006, If 0, Class=Hub, Driver=hub/4p, 480M
> > > [trimmed]
> > >      |__ Port 006: Dev 019, If 0, Class=Hub, Driver=hub/4p, 480M
> > >          ID 2109:2817 VIA Labs, Inc.
> > > /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
> > > [trimmed]
> > >      |__ Port 006: Dev 006, If 0, Class=Hub, Driver=hub/4p, 5000M
> > >          ID 2109:0817 VIA Labs, Inc.
> > > 
> > > I removed some content that is not relevant to my question.
> > > 
> > > Note the Bus 001.Port 006 and Bus 002.Port 006 entries.
> > > 
> > > I verified that both are for the same (one) device. They do not show when I disconnect it.
> > > The device is an external 4-port USB3.0 hub. It is listed once as 480M and once as 5000M.
> > > Nothing is plugged into any of the four ports.
> > > 
> > > Is this correct? Why does this device show twice in the list?
> > 
> > That's odd, as the same device shouldn't be on multiple busses.  Busses
> > are a "root port" on the system (i.e. a new PCI controller device), so
> > are you sure you just don't have multiple devices with the same
> > device/vendor id?
> > 
> > What is the diff between running the command before and after removing a
> > single device?
> > 
> > thanks,
> > 
> > greg k-h
> 
> BTW, I run a nightly log of system commands which includes lsusb.
> The first time the device is listed twice is:
> 
> $ uname -a
> Linux e7.eyal.emu.id.au 6.9.11-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 25 18:17:34 UTC 2024 x86_64 GNU/Linux

Ah, something has changed, that's more interesting.

Any way you can use 'git bisect' to see where it changed?

> $ lsusb --version
> lsusb (usbutils) 017

Did this get upgraded from an older version?

Do you see the same thing if you run 'usb-devices' before and after
(i.e. 2 devices being added)?  How about just a normal 'lsusb'?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Understanding 'lsusb -t'
  2024-08-30 12:14 Understanding 'lsusb -t' Eyal Lebedinsky
  2024-08-30 12:32 ` Greg KH
  2024-08-30 14:25 ` Alan Stern
@ 2024-08-30 14:31 ` Michał Pecio
  2 siblings, 0 replies; 14+ messages in thread
From: Michał Pecio @ 2024-08-30 14:31 UTC (permalink / raw)
  To: eyal; +Cc: linux-usb

Hi,

This is nothing new.

Shocking, maybe, and only until you get used to it, but not new ;)

A USB 3.x bus is logically two busses, one for SuperSpeed devices and
one for high-speed (and slower).

A USB 3.x hub is logically two hubs, one on the SS bus and one on HS.

(Note that you also have two root hubs of different speed.)

All other devices are only on one bus. This includes USB 1.1/2.0 hubs.

Regards,
Michal

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Understanding 'lsusb -t'
  2024-08-30 14:27       ` Greg KH
@ 2024-08-30 14:33         ` Eyal Lebedinsky
  0 siblings, 0 replies; 14+ messages in thread
From: Eyal Lebedinsky @ 2024-08-30 14:33 UTC (permalink / raw)
  To: linux-usb

On 31/8/24 12:27 am, Greg KH wrote:
> On Fri, Aug 30, 2024 at 11:43:39PM +1000, Eyal Lebedinsky wrote:
>> On 30/8/24 11:41 pm, Eyal Lebedinsky wrote:
>>> On 30/8/24 10:32 pm, Greg KH wrote:
>>>> On Fri, Aug 30, 2024 at 10:14:20PM +1000, Eyal Lebedinsky wrote:
>>>>> I assume that the generated list is a tree, so each leaf (Device/If) is on only one point.
>>>>>
>>>>> I note this output:
>>>>>
>>>>> $ lsusb -tv
>>>>> /:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
>>>>>       ID 1d6b:0002 Linux Foundation 2.0 root hub
>>>>> [trimmed]
>>>>>       |__ Port 004: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
>>>>> [trimmed]
>>>>>       |__ Port 005: Dev 006, If 0, Class=Hub, Driver=hub/4p, 480M
>>>>> [trimmed]
>>>>>       |__ Port 006: Dev 019, If 0, Class=Hub, Driver=hub/4p, 480M
>>>>>           ID 2109:2817 VIA Labs, Inc.
>>>>> /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
>>>>> [trimmed]
>>>>>       |__ Port 006: Dev 006, If 0, Class=Hub, Driver=hub/4p, 5000M
>>>>>           ID 2109:0817 VIA Labs, Inc.
>>>>>
>>>>> I removed some content that is not relevant to my question.
>>>>>
>>>>> Note the Bus 001.Port 006 and Bus 002.Port 006 entries.
>>>>>
>>>>> I verified that both are for the same (one) device. They do not show when I disconnect it.
>>>>> The device is an external 4-port USB3.0 hub. It is listed once as 480M and once as 5000M.
>>>>> Nothing is plugged into any of the four ports.
>>>>>
>>>>> Is this correct? Why does this device show twice in the list?
>>>>
>>>> That's odd, as the same device shouldn't be on multiple busses.  Busses
>>>> are a "root port" on the system (i.e. a new PCI controller device), so
>>>> are you sure you just don't have multiple devices with the same
>>>> device/vendor id?
>>>
>>> The hub is on an extension cable, and I just unplug it the hub.
>>>
>>>> What is the diff between running the command before and after removing a
>>>> single device?
>>>
>>> $ lsusb -tv >lsusb-all.log
>>> $ lsusb -tv >lsusb-less.log
>>> $ diff -u lsusb-all.log lsusb-less.log
>>> --- lsusb-all.log       2024-08-30 23:39:09.782062079 +1000
>>> +++ lsusb-less.log      2024-08-30 23:39:22.608987407 +1000
>>> @@ -48,8 +48,6 @@
>>>                ID 0c45:7401 Microdia TEMPer Temperature Sensor
>>>            |__ Port 004: Dev 018, If 1, Class=Human Interface Device, Driver=[none], 1.5M
>>>                ID 0c45:7401 Microdia TEMPer Temperature Sensor
>>> -    |__ Port 006: Dev 019, If 0, Class=Hub, Driver=hub/4p, 480M
>>> -        ID 2109:2817 VIA Labs, Inc.
>>>    /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
>>>        ID 1d6b:0003 Linux Foundation 3.0 root hub
>>>        |__ Port 004: Dev 002, If 0, Class=Hub, Driver=hub/4p, 5000M
>>> @@ -58,5 +56,3 @@
>>>                ID 0bda:0411 Realtek Semiconductor Corp. Hub
>>>        |__ Port 005: Dev 003, If 0, Class=Hub, Driver=hub/4p, 5000M
>>>            ID 05e3:0612 Genesys Logic, Inc. Hub
>>> -    |__ Port 006: Dev 006, If 0, Class=Hub, Driver=hub/4p, 5000M
>>> -        ID 2109:0817 VIA Labs, Inc.
>>
>> Also, here these the log messages when I reconnect the hub:
>>
>> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
>> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 1-6: Product: USB2.0 Hub
>> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 1-6: Manufacturer: VIA Labs, Inc.
>> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: hub 1-6:1.0: USB hub found
>> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: hub 1-6:1.0: 4 ports detected
>> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 2-6: new SuperSpeed USB device number 7 using xhci_hcd
>> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 2-6: New USB device found, idVendor=2109, idProduct=0817, bcdDevice= 0.50
>> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
>> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 2-6: Product: USB3.0 Hub
>> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: usb 2-6: Manufacturer: VIA Labs, Inc.
>> 2024-08-30T23:41:52+10:00 e7.eyal.emu.id.au kernel: hub 2-6:1.0: USB hub found
>> 2024-08-30T23:41:52+1G0:00 e7.eyal.emu.id.au kernel: hub 2-6:1.0: 4 ports detected
> 
> Extension cables are very wierd, and you are right, this is two
> different hubs on two ports.  Is this a thunderbolt device somehow?
> 
> Anyway, as long as everything is working properly, all should be good.
> 
> What happens when you plug a device into this cable at the other end,
> does it show up twice?  Or just once?

I connected another hub directly to the mobo and it shows twice (1-7 and 2-7):

2024-08-31T00:29:38+10:00 e7.eyal.emu.id.au kernel: usb 1-7: New USB device found, idVendor=0bda, idProduct=5411, bcdDevice= 1.04
2024-08-31T00:29:38+10:00 e7.eyal.emu.id.au kernel: usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0
2024-08-31T00:29:38+10:00 e7.eyal.emu.id.au kernel: usb 1-7: Product: 4-Port USB 2.0 Hub
2024-08-31T00:29:38+10:00 e7.eyal.emu.id.au kernel: usb 1-7: Manufacturer: Generic
2024-08-31T00:29:38+10:00 e7.eyal.emu.id.au kernel: hub 1-7:1.0: USB hub found
2024-08-31T00:29:38+10:00 e7.eyal.emu.id.au kernel: hub 1-7:1.0: 4 ports detected
2024-08-31T00:29:38+10:00 e7.eyal.emu.id.au kernel: usb 2-7: new SuperSpeed USB device number 12 using xhci_hcd
2024-08-31T00:29:38+10:00 e7.eyal.emu.id.au kernel: usb 2-7: New USB device found, idVendor=0bda, idProduct=0411, bcdDevice= 1.04
2024-08-31T00:29:38+10:00 e7.eyal.emu.id.au kernel: usb 2-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0
2024-08-31T00:29:38+10:00 e7.eyal.emu.id.au kernel: usb 2-7: Product: 4-Port USB 3.0 Hub
2024-08-31T00:29:38+10:00 e7.eyal.emu.id.au kernel: usb 2-7: Manufacturer: Generic
2024-08-31T00:29:38+10:00 e7.eyal.emu.id.au kernel: hub 2-7:1.0: USB hub found
2024-08-31T00:29:38+10:00 e7.eyal.emu.id.au kernel: hub 2-7:1.0: 4 ports detected

> thanks,
> 
> greg k-h

-- 
Eyal at Home (eyal@eyal.emu.id.au)


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Understanding 'lsusb -t'
  2024-08-30 14:25 ` Alan Stern
@ 2024-08-30 14:49   ` Greg KH
  2024-08-30 14:49   ` Eyal Lebedinsky
  1 sibling, 0 replies; 14+ messages in thread
From: Greg KH @ 2024-08-30 14:49 UTC (permalink / raw)
  To: Alan Stern; +Cc: Eyal Lebedinsky, linux-usb

On Fri, Aug 30, 2024 at 10:25:19AM -0400, Alan Stern wrote:
> On Fri, Aug 30, 2024 at 10:14:20PM +1000, Eyal Lebedinsky wrote:
> > I assume that the generated list is a tree, so each leaf (Device/If) is on only one point.
> > 
> > I note this output:
> > 
> > $ lsusb -tv
> > /:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
> >     ID 1d6b:0002 Linux Foundation 2.0 root hub
> > [trimmed]
> >     |__ Port 004: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
> > [trimmed]
> >     |__ Port 005: Dev 006, If 0, Class=Hub, Driver=hub/4p, 480M
> > [trimmed]
> >     |__ Port 006: Dev 019, If 0, Class=Hub, Driver=hub/4p, 480M
> >         ID 2109:2817 VIA Labs, Inc.
> > /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
> > [trimmed]
> >     |__ Port 006: Dev 006, If 0, Class=Hub, Driver=hub/4p, 5000M
> >         ID 2109:0817 VIA Labs, Inc.
> > 
> > I removed some content that is not relevant to my question.
> > 
> > Note the Bus 001.Port 006 and Bus 002.Port 006 entries.
> > 
> > I verified that both are for the same (one) device. They do not show when I disconnect it.
> > The device is an external 4-port USB3.0 hub. It is listed once as 480M and once as 5000M.
> > Nothing is plugged into any of the four ports.
> > 
> > Is this correct? Why does this device show twice in the list?
> 
> USB 3 actually uses _two_ physical buses.  Each cable has two twisted 
> pairs of wires carrying the SuperSpeed (5000 Mb/s or more) USB-3 data in 
> and out, and also has two wires carrying the legacy USB-2 data (480 Mb/s 
> or less) in and out.
> 
> These physical buses are represented separately in the kernel.  In your 
> example, Bus 001 and Bus 002 use the same cable and the same xHCI host 
> controller; Bus 001 is the legacy USB-2 bus (you can tell by the speed) 
> and Bus 002 is the SuperSpeed bus.

{sigh} I totally missed the 2 different speeds, I was just looking at
the host controller driver type.

I'll blame the jet-lag, but I really should have caught that...

thanks for clearing this up.

greg k-h

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Understanding 'lsusb -t'
  2024-08-30 14:25 ` Alan Stern
  2024-08-30 14:49   ` Greg KH
@ 2024-08-30 14:49   ` Eyal Lebedinsky
  1 sibling, 0 replies; 14+ messages in thread
From: Eyal Lebedinsky @ 2024-08-30 14:49 UTC (permalink / raw)
  To: linux-usb

On 31/8/24 12:25 am, Alan Stern wrote:
> On Fri, Aug 30, 2024 at 10:14:20PM +1000, Eyal Lebedinsky wrote:
>> I assume that the generated list is a tree, so each leaf (Device/If) is on only one point.
>>
>> I note this output:
>>
>> $ lsusb -tv
>> /:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
>>      ID 1d6b:0002 Linux Foundation 2.0 root hub
>> [trimmed]
>>      |__ Port 004: Dev 004, If 0, Class=Hub, Driver=hub/4p, 480M
>> [trimmed]
>>      |__ Port 005: Dev 006, If 0, Class=Hub, Driver=hub/4p, 480M
>> [trimmed]
>>      |__ Port 006: Dev 019, If 0, Class=Hub, Driver=hub/4p, 480M
>>          ID 2109:2817 VIA Labs, Inc.
>> /:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 10000M
>> [trimmed]
>>      |__ Port 006: Dev 006, If 0, Class=Hub, Driver=hub/4p, 5000M
>>          ID 2109:0817 VIA Labs, Inc.
>>
>> I removed some content that is not relevant to my question.
>>
>> Note the Bus 001.Port 006 and Bus 002.Port 006 entries.
>>
>> I verified that both are for the same (one) device. They do not show when I disconnect it.
>> The device is an external 4-port USB3.0 hub. It is listed once as 480M and once as 5000M.
>> Nothing is plugged into any of the four ports.
>>
>> Is this correct? Why does this device show twice in the list?
> 
> USB 3 actually uses _two_ physical buses.  Each cable has two twisted
> pairs of wires carrying the SuperSpeed (5000 Mb/s or more) USB-3 data in
> and out, and also has two wires carrying the legacy USB-2 data (480 Mb/s
> or less) in and out.
> 
> These physical buses are represented separately in the kernel.  In your
> example, Bus 001 and Bus 002 use the same cable and the same xHCI host
> controller; Bus 001 is the legacy USB-2 bus (you can tell by the speed)
> and Bus 002 is the SuperSpeed bus.
> 
> Most devices use one or the other of those signal paths, depending on
> the speed they connect at.  But hubs have to handle both paths, because
> the devices plugged into them may want to use either one.  Therefore
> your VIA Labs hub connects to both of these buses.  That's why it
> appears twice in the output from lsusb.

So this is expected, good.

BTW, the reason I looked at this is that I started, lst night, to be flooded with these messages:
	kernel: usb usb2-port6: Cannot enable. Maybe the USB cable is bad?
and I thought it was from a USB-C PCIe card I have.

Rebooting the machine and cold shutdown/boot did not help, not even removing the PCIe card.
Now I looked at all the other devices. and just plug/unplug this USB3 hub stopped the errors.

I still do not know why this started at 5am today, when a lsusb runs from cron. Hope it works tonight.

I learn something every day.

Thanks,
	Eyal

> Alan Stern

-- 
Eyal at Home (eyal@eyal.emu.id.au)


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-08-30 14:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-30 12:14 Understanding 'lsusb -t' Eyal Lebedinsky
2024-08-30 12:32 ` Greg KH
2024-08-30 13:41   ` Eyal Lebedinsky
2024-08-30 13:43     ` Eyal Lebedinsky
2024-08-30 14:27       ` Greg KH
2024-08-30 14:33         ` Eyal Lebedinsky
2024-08-30 13:55   ` Eyal Lebedinsky
2024-08-30 14:07   ` Eyal Lebedinsky
2024-08-30 14:28     ` Understanding 'lsusb -t' [correction] Eyal Lebedinsky
2024-08-30 14:28     ` Understanding 'lsusb -t' Greg KH
2024-08-30 14:25 ` Alan Stern
2024-08-30 14:49   ` Greg KH
2024-08-30 14:49   ` Eyal Lebedinsky
2024-08-30 14:31 ` Michał Pecio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).