BenLunt wrote: ↑Wed Feb 26, 2025 1:39 pm
What is the Hub? If the Hub is full-speed only, you have to treat the thumb-drive as full-speed only.
A device will only be as fast as the parent it is plugged into.
Thanks, Ben. It's a CablesToGo USB2.0 hub (according to the label). I'm getting a high speed connection to the root hub port when it detects the hub on startup. 480Mbps.
I double checked what linux thinks of the hub, and it matches what I was seeing:
Code: Select all
/sys/bus/usb/devices/3-11.4# ls -l
total 0
drwxr-xr-x 8 root root 0 Feb 26 20:33 3-11.4:1.0
drwxr-xr-x 5 root root 0 Feb 26 20:33 3-11.4.3
-rw-r--r-- 1 root root 4096 Feb 26 20:34 authorized
-rw-r--r-- 1 root root 4096 Feb 26 20:34 avoid_reset_quirk
-r--r--r-- 1 root root 4096 Feb 26 20:33 bcdDevice
-rw-r--r-- 1 root root 4096 Feb 26 20:34 bConfigurationValue
-r--r--r-- 1 root root 4096 Feb 26 20:33 bDeviceClass
-r--r--r-- 1 root root 4096 Feb 26 20:34 bDeviceProtocol
-r--r--r-- 1 root root 4096 Feb 26 20:34 bDeviceSubClass
-r--r--r-- 1 root root 4096 Feb 26 20:34 bmAttributes
-r--r--r-- 1 root root 4096 Feb 26 20:34 bMaxPacketSize0
-r--r--r-- 1 root root 4096 Feb 26 20:34 bMaxPower
-r--r--r-- 1 root root 4096 Feb 26 20:34 bNumConfigurations
-r--r--r-- 1 root root 4096 Feb 26 20:34 bNumInterfaces
-r--r--r-- 1 root root 4096 Feb 26 20:34 busnum
-r--r--r-- 1 root root 4096 Feb 26 20:34 configuration
-r--r--r-- 1 root root 65553 Feb 26 20:33 descriptors
-r--r--r-- 1 root root 4096 Feb 26 20:34 dev
-r--r--r-- 1 root root 4096 Feb 26 20:34 devnum
-r--r--r-- 1 root root 4096 Feb 26 20:34 devpath
lrwxrwxrwx 1 root root 0 Feb 26 20:33 driver -> ../../../../../../bus/usb/drivers/usb
drwxr-xr-x 3 root root 0 Feb 26 20:34 ep_00
-r--r--r-- 1 root root 4096 Feb 26 20:33 idProduct
-r--r--r-- 1 root root 4096 Feb 26 20:33 idVendor
-r--r--r-- 1 root root 4096 Feb 26 20:34 ltm_capable
-r--r--r-- 1 root root 4096 Feb 26 20:34 maxchild
lrwxrwxrwx 1 root root 0 Feb 26 20:34 port -> ../3-11:1.0/3-11-port4
drwxr-xr-x 2 root root 0 Feb 26 20:34 power
-r--r--r-- 1 root root 4096 Feb 26 20:34 quirks
-r--r--r-- 1 root root 4096 Feb 26 20:34 removable
--w------- 1 root root 4096 Feb 26 20:34 remove
-r--r--r-- 1 root root 4096 Feb 26 20:34 rx_lanes
-r--r--r-- 1 root root 4096 Feb 26 20:34 speed
lrwxrwxrwx 1 root root 0 Feb 26 20:33 subsystem -> ../../../../../../bus/usb
-r--r--r-- 1 root root 4096 Feb 26 20:34 tx_lanes
-rw-r--r-- 1 root root 4096 Feb 26 20:33 uevent
-r--r--r-- 1 root root 4096 Feb 26 20:34 urbnum
-r--r--r-- 1 root root 4096 Feb 26 20:34 version
/sys/bus/usb/devices/3-11.4# cat idVendor
0409
/sys/bus/usb/devices/3-11.4# cat idProduct
005a
/sys/bus/usb/devices/3-11.4# cat bcdDevice
0100
/sys/bus/usb/devices/3-11.4# cat speed
480
/sys/bus/usb/devices/3-11.4# cat bDeviceClass
09
/sys/bus/usb/devices/3-11.4# cat bDeviceSubClass
00
/sys/bus/usb/devices/3-11.4# cat bDeviceProtocol
01
BenLunt wrote: ↑Wed Feb 26, 2025 1:39 pmAlso, if you are on an EHCI Host Controller, EHCI has additional fields for devices plugged into an external hub. Do you account for these fields?
BenLunt wrote: ↑Wed Feb 26, 2025 1:39 pmSays you may be using an EHCI.
If you are on an xHCI Host Controller, it too has additional fields for devices plugged into an external hub.
My xhci code is incomplete. The last thing it does is complete the bios to os handoff.
BenLunt wrote: ↑Wed Feb 26, 2025 1:39 pmDoes this mean you are on an xHCI or an EHCI?
I think ehci. Which is supported logically because the xhci driver would never even see the hub, much less timeout on a device attached to it.
BenLunt wrote: ↑Wed Feb 26, 2025 1:39 pmBoth of these controllers have additional fields that must be accounted for when the device is downstream of an external hub.
Thank you, I am looking at this more carefully.
https://www.intel.com/content/dam/www/p ... or-usb.pdf section 3.6 figure 3-7 page 56/155 has the QUEUE HEAD spec.
These are the fields from figure 3-7, and I don't see any others: Port Number, and Hub Addr.
Figure 3-7 says "These fields are used exclusively to support split transactions to USB 2.0 Hubs" Also, Table 3-20 says:
Port Number. This field is ignored by the host controller unless the EPS field indicates a full- or low-speed device.
Hub Addr. This field is ignored by the host controller unless the EPS field indicates a full- or low-speed device.
I left them set to 0 (unless the device was a full or low speed device). Imagine how surprised I was now that I set them to their values unconditionally, and it doesn't time out anymore. I mean Port Number and Hub Addr for High Speed devices.
Now it halts...
Thank you again for suggesting I look at these fields.