I run OpenWRT 22.03.2 in a Huawei hg556a (B) and noticed that occasionally all three USB ports operate at USB 1.1 speed when they actually are 2.0 and work fine at high speed when they do. Previously I had OpenWRT 21.02 with the same problem.
When this problem shows up it is from the first boot after turn on and persists until power is removed - it survives a hot 'reboot'. I have compared startup logs and they are identical except for the internal USB hub operating with ohci instead of ehci and a notable timing difference in its detection:
Startup with USB 2.0:
[ 5.199426] hub 2-0:1.0: USB hub found
[ 5.204867] hub 2-0:1.0: 2 ports detected
[ 5.216455] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 5.235857] init: - preinit -
[ 5.633292] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 6.231166] hub 1-1:1.0: USB hub found
[ 6.245656] hub 1-1:1.0: 2 ports detected
[ 6.414206] random: procd: uninitialized urandom read (4 bytes read)
Startup with USB 1.1:
[ 5.210191] hub 2-0:1.0: USB hub found
[ 5.217049] hub 2-0:1.0: 2 ports detected
[ 5.226551] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 5.245128] init: - preinit -
[ 6.368954] usb 2-1: new full-speed USB device number 2 using ohci-platform
[ 6.787871] usb 2-1: not running at top speed; connect to a high speed hub
[ 6.807930] random: procd: uninitialized urandom read (4 bytes read)
[ 6.815757] hub 2-1:1.0: USB hub found
[ 6.829628] hub 2-1:1.0: 2 ports detected
Note the timing difference in the "new high/full-speed USB" line - only 0,4 in the correct start and 1,1 in the incorrect one. I have two logs and both exhibit this difference.
This problem appears randomly. Yesterday I power cycled the router 6 times and all went in 2.0. Today again and 2 out of 4 boots have been in 1.1. It does not matter whether there is a USB device plugged or not at startup.
Here is the USB configuration with USB 2.0 and nothing plugged:
root@OpenWrt:~# cat /sys/kernel/debug/usb/devices
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 2
B: Alloc= 0/800 us ( 0%), #Int= 1, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev= 5.10
S: Manufacturer=Linux 5.10.146 ehci_hcd
S: Product=EHCI Host Controller
S: SerialNumber=ehci-platform
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 2
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0424 ProdID=2502 Rev= 0.01
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 2mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=256ms
T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0001 Rev= 5.10
S: Manufacturer=Linux 5.10.146 ohci_hcd
S: Product=Generic Platform OHCI controller
S: SerialNumber=ohci-platform
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms
And with USB 1.1:
root@OpenWrt:~# cat /sys/kernel/debug/usb/devices
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 2
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev= 5.10
S: Manufacturer=Linux 5.10.146 ehci_hcd
S: Product=EHCI Host Controller
S: SerialNumber=ehci-platform
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms
T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 0/900 us ( 0%), #Int= 1, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0001 Rev= 5.10
S: Manufacturer=Linux 5.10.146 ohci_hcd
S: Product=Generic Platform OHCI controller
S: SerialNumber=ohci-platform
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms
T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 2
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0424 ProdID=2502 Rev= 0.01
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 2mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=255ms
Driver bug? Workaround possible?
This has probably been this way for some time but I just updated to a Huawei E3372 LTE USB modem from a K4510 3G one and the higher speed made this very obvious. At USB 1.1 speed I get 3-4mbps internet speed while at USB 2.0 I have 10-30mbps.
Thank you!