starfive-tech / Fedora_on_StarFive

62 stars 12 forks source link

USB: sometime fails to detect builtin USB hub #40

Closed mcd500 closed 3 years ago

mcd500 commented 3 years ago

When booting BeagleV with 5.13.rc2 or 5.13.rc3 kernel, onece out of 10, it fails to detect builtin usb hub and hangs. These are the logs.

mmc_host mmc1: Bus speed (slot 0) = 100000000Hz (slot req 400000Hz, actual 400000HZ div = 125)
Btrfs loaded, crc32c=crc32c-generic, zoned=no
dw_mmc 10000000.mmc: Unexpected interrupt latency
cfg80211: Loading compiled-in X.509 certificates for regulatory database
dw_mmc 10010000.mmc: Unexpected interrupt latency
cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
dw-apb-uart 12440000.serial: forbid DMA for kernel console
Freeing unused kernel memory: 2136K
Checked W+X mappings: passed, no W+X pages found
rodata_test: all tests were successful
Run /init as init process
systemd[1]: System time before build time, advancing clock.
systemd[1]: systemd v246.6-3.0.riscv64.fc33 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP )
systemd[1]: Detected architecture riscv64.
systemd[1]: Running in initial RAM disk.
xhci-hcd xhci-hcd.0.auto: Error while assigning device slot ID
xhci-hcd xhci-hcd.0.auto: Error while assigning device slot ID
xhci-hcd xhci-hcd.0.auto: Max number of devices this xHCI host supports is 32.
xhci-hcd xhci-hcd.0.auto: Max number of devices this xHCI host supports is 32.
usb usb1-port1: couldn't allocate usb_device
usb usb2-port1: couldn't allocate usb_device

This is the log when it is ok

mmc_host mmc0: Bus speed (slot 0) = 100000000Hz (slot req 400000Hz, actual 400000HZ div = 125)
cfg80211: Loading compiled-in X.509 certificates for regulatory database
dw_mmc 10000000.mmc: Unexpected interrupt latency
cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
dw_mmc 10000000.mmc: Unexpected interrupt latency
dw-apb-uart 12440000.serial: forbid DMA for kernel console
Freeing unused kernel memory: 2136K
dw_mmc 10000000.mmc: Unexpected interrupt latency
usb 1-1: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice= 4.02
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
dw_mmc 10000000.mmc: Unexpected interrupt latency
usb 1-1: Product: USB2.0 Hub
dw_mmc 10000000.mmc: Unexpected interrupt latency
usb 1-1: Manufacturer: GenesysLogic
dw_mmc 10000000.mmc: Unexpected interrupt latency
usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
mmc_host mmc0: Bus speed (slot 0) = 100000000Hz (slot req 50000000Hz, actual 50000000HZ div = 1)
Checked W+X mappings: passed, no W+X pages found
dw_mmc 10000000.mmc: Unexpected interrupt latency
rodata_test: all tests were successful
mmc0: new high speed SDHC card at address 0007
Run /init as init process
hub 1-1:1.0: USB hub found
mmcblk0: mmc0:0007 SD16G 14.5 GiB 
hub 1-1:1.0: 4 ports detected
usb 2-1: New USB device found, idVendor=05e3, idProduct=0616, bcdDevice= 4.02
usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1: Product: USB3.0 Hub
usb 2-1: Manufacturer: GenesysLogic
tommythorn commented 3 years ago

Just one annec-datapoint: I just hit this for the first time, but I had just updated the U-Boot. With the older U-Boot (and the same esmil-kernel-20210521-a22fc12 kernel) I hadn't hit it.

mcd500 commented 3 years ago

I forgot how to reproduce it. I used the u-boot from https://github.com/starfive-tech/u-boot/tree/Fedora and the kernel from https://github.com/esmil/linux/

mcd500 commented 3 years ago

This same issue is discussed at https://github.com/starfive-tech/linux/issues/15 Closing this here.