Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi 4 Modell 4GB USB Ports suspended with Raspberry Pi OS 32 #3971

Open
fopinski opened this issue Nov 26, 2020 · 2 comments
Open

Comments

@fopinski
Copy link

fopinski commented Nov 26, 2020

Describe the bug
Raspberry Pi 4 Modell 4GB USB Ports suspended with RPI OS 32.
Ports can't be activated.

To reproduce
Install latest image of Raspberry Pi OS 32 (2020-08-20-raspios-buster-armhf) with Raspberry Imager.

Expected behaviour
USB hardware attached to the ports should get recognized.

Actual behaviour
USB hardware attached to the ports are not recognized as ports are suspended.

System
Raspberry Pi 4 Modell B 4GB

cat /etc/rpi-issue
Raspberry Pi reference 2020-08-20
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 7252c154838ec5b4576f29c996ac8fe3750cae12, stage4

vcgencmd version
Oct 22 2020 13:59:27
Copyright (c) 2012 Broadcom
version 74e754ff8947c58d2773253f77f6f68a303188f8 (clean) (release) (start)

uname -a
Linux raspberrypi 5.4.72-v8+ #1356 SMP PREEMPT Thu Oct 22 13:58:52 BST 2020 aarch64 GNU/Linux

raspinfo.txt

Logs and Additional context

Thread in forum https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=291752

Here is the summary of what I did with a lot to read with logs and everything that could be interessting:

  • I used different mice and keyboards
  • I used different SD cards for the OS
  • I powered it with a powerbank (5V 2A)
  • I powered it with the official PSU (5,1V 3A)
  • The usb error messages in dmesg are there even without any usb device attached
  • The power LED is always on, no underpower
  • I reduce total_mem in config.txt -> no usb
  • I added max_usb_current=1 to /boot/config.txt -> no usb
  • The system is always booting and the desktop is showing up
  • I'm always able to configure SSH acces to get information

The USB ports are basically working with

  • Noobs
  • Raspberry Pi OS 64

But not working with

  • Raspberry Pi OS 32 -> this is what I want to use
  • Ubuntu 64

OS used

  • Raspberry Pi OS 32 installed with Noobs (yes yes "don't use it" but it was preinstalled on the SD card)
  • Ubuntu 64 installed with Noobs
  • Raspberry Pi OS 32 installed with Raspberry Imager
  • Raspberry Pi OS 64 installed with Raspberry Imager

Chronological order and logs
Sorry I did not know about raspinfo before I tried to open an issue here.

  1. installed Raspberry Pi OS 32 with Noobs

interessting part from dmesg

[   21.984803] usb 1-1: device descriptor read/64, error -110
[   22.254578] usb 1-1: new high-speed USB device number 3 using xhci_hcd
[   27.424802] usb 1-1: device descriptor read/64, error -110
[   42.784813] usb 1-1: device descriptor read/64, error -110
[   42.904959] usb usb1-port1: attempt power cycle
[   43.614569] usb 1-1: new high-speed USB device number 4 using xhci_hcd
[   48.714854] usb 1-1: device descriptor read/8, error -110
[   53.914761] usb 1-1: device descriptor read/8, error -110
[   54.184579] usb 1-1: new high-speed USB device number 5 using xhci_hcd
[   59.274753] usb 1-1: device descriptor read/8, error -110
[   64.474801] usb 1-1: device descriptor read/all, error -110
[   64.475191] usb usb1-port1: unable to enumerate USB device

complete dmesg
dmesg1.txt

The I did a sudo apt update, sudo full-upgrade

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.4.72-v7l+ #1356 SMP Thu Oct 22 13:57:51 BST 2020 armv7l GNU/Linux

pi@raspberrypi:~ $ sudo rpi-eeprom-update
BCM2711 detected
Dedicated VL805 EEPROM detected
BOOTLOADER: up-to-date
CURRENT: Thu  3 Sep 12:11:43 UTC 2020 (1599135103)
 LATEST: Thu  3 Sep 12:11:43 UTC 2020 (1599135103)
 FW DIR: /lib/firmware/raspberrypi/bootloader/stable
VL805: up-to-date
CURRENT: 000138a1
 LATEST: 000138a1

pi@raspberrypi:~ $ vcgencmd bootloader_version
Sep  3 2020 13:11:43
version c305221a6d7e532693cc7ff57fddfc8649def167 (release)
timestamp 1599135103

Issue still persists.
Some info regarding usb

pi@raspberrypi:~/uhub/uhubctl $ sudo lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M

pi@raspberrypi:~/uhub/uhubctl $ sudo lsusb -v

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0
  bDeviceProtocol         3
  bMaxPacketSize0         9
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0003 3.0 root hub
  bcdDevice            5.04
  iManufacturer           3 Linux 5.4.72-v7l+ xhci-hcd
  iProduct                2 xHCI Host Controller
  iSerial                 1 0000:01:00.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x001f
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
        bMaxBurst               0
Hub Descriptor:
  bLength              12
  bDescriptorType      42
  nNbrPorts             4
  wHubCharacteristic 0x0009
    Per-port power switching
    Per-port overcurrent protection
  bPwrOn2PwrGood       10 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  bHubDecLat          0.0 micro seconds
  wHubDelay             0 nano seconds
  DeviceRemovable    0x00
 Hub Port Status:
   Port 1: 0000.02a0 5Gbps power Rx.Detect
   Port 2: 0000.02a0 5Gbps power Rx.Detect
   Port 3: 0000.02a0 5Gbps power Rx.Detect
   Port 4: 0000.02a0 5Gbps power Rx.Detect
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength       0x000f
  bNumDeviceCaps          1
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x02
      Latency Tolerance Messages (LTM) Supported
    wSpeedsSupported   0x0008
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   3
      Lowest fully-functional device speed is SuperSpeed (5Gbps)
    bU1DevExitLat           4 micro seconds
    bU2DevExitLat         231 micro seconds
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0001
  Self Powered

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            5.04
  iManufacturer           3 Linux 5.4.72-v7l+ xhci-hcd
  iProduct                2 xHCI Host Controller
  iSerial                 1 0000:01:00.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0019
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             1
  wHubCharacteristic 0x0009
    Per-port power switching
    Per-port overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood       10 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x02
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0501 highspeed power connect
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0001
  Self Powered

pi@raspberrypi:/sys/bus/usb/devices/usb1 $ grep . $(grep -rli mouse /sys/bus/usb/devices/usb*/ 2>/dev/null|grep product | rev | cut -f 2- -d '/' | rev )power/{runtime_suspended_time,runtime_status,runtime_active_time,level,control,connected_duration,autosuspend_delay_ms,autosuspend,active_duration}
power/runtime_suspended_time:1199086
power/runtime_status:suspended
power/runtime_active_time:42942
power/level:auto
power/control:auto
power/connected_duration:1242030
power/autosuspend_delay_ms:0
power/autosuspend:0
power/active_duration:42940

pi@raspberrypi:/sys/bus/usb/devices/usb2 $ grep . $(grep -rli mouse /sys/bus/usb/devices/usb*/ 2>/dev/null|grep product | rev | cut -f 2- -d '/' | rev )power/{runtime_suspended_time,runtime_status,runtime_active_time,level,control,connected_duration,autosuspend_delay_ms,autosuspend,active_duration}
power/runtime_suspended_time:1320794
power/runtime_status:suspended
power/runtime_active_time:103
power/level:auto
power/control:auto
power/connected_duration:1320900
power/autosuspend_delay_ms:0
power/autosuspend:0
power/active_duration:110

I installed uhubctl (https://github.com/mvp/uhubctl) and tried to activate port 1

pi@raspberrypi:~/uhub/uhubctl $ sudo ./uhubctl -a on -p 1
Current status for hub 2 [1d6b:0003 Linux 5.4.72-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 3.00, 4 ports]
  Port 1: 02a0 power 5gbps Rx.Detect
Sent power on request
New status for hub 2 [1d6b:0003 Linux 5.4.72-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0, USB 3.00, 4 ports]
  Port 1: 02a0 power 5gbps Rx.Detect
Current status for hub 1 [1d6b:0002 Linux 5.4.72-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0]
  Port 1: 0501 power highspeed connect []
Sent power on request
New status for hub 1 [1d6b:0002 Linux 5.4.72-v7l+ xhci-hcd xHCI Host Controller 0000:01:00.0]
  Port 1: 0501 power highspeed connect []

dmesg tells me the following after the command is finished

[  573.368707] usb 1-1: new high-speed USB device number 6 using xhci_hcd
[  578.548969] usb 1-1: device descriptor read/64, error -110
[  593.909113] usb 1-1: device descriptor read/64, error -110
[  594.178865] usb 1-1: new high-speed USB device number 7 using xhci_hcd
[  599.349160] usb 1-1: device descriptor read/64, error -110
[  614.709285] usb 1-1: device descriptor read/64, error -110
[  614.829421] usb usb1-port1: attempt power cycle
[  615.539035] usb 1-1: new high-speed USB device number 8 using xhci_hcd
[  620.639355] usb 1-1: device descriptor read/8, error -110
[  625.839359] usb 1-1: device descriptor read/8, error -110
[  626.109120] usb 1-1: new high-speed USB device number 9 using xhci_hcd
[  631.199446] usb 1-1: device descriptor read/8, error -110
[  636.399388] usb 1-1: device descriptor read/8, error -110
[  636.519602] usb usb1-port1: unable to enumerate USB device
[  636.699208] usb 1-1: new high-speed USB device number 10 using xhci_hcd
[  641.909500] usb 1-1: device descriptor read/64, error -110
[  657.270084] usb 1-1: device descriptor read/64, error -110
[  657.539871] usb 1-1: new high-speed USB device number 11 using xhci_hcd
[  662.710383] usb 1-1: device descriptor read/64, error -110
[  678.081029] usb 1-1: device descriptor read/all, error -110
[  678.081406] usb usb1-port1: attempt power cycle
[  678.790836] usb 1-1: new high-speed USB device number 12 using xhci_hcd
[  683.841281] usb 1-1: device descriptor read/8, error -110
[  689.041410] usb 1-1: device descriptor read/8, error -110
[  689.311240] usb 1-1: new high-speed USB device number 13 using xhci_hcd
[  694.401682] usb 1-1: device descriptor read/8, error -110
[  699.601840] usb 1-1: device descriptor read/all, error -110
[  699.602223] usb usb1-port1: unable to enumerate USB device

I executed rpi-update (sure, why not...)

pi@raspberrypi:~ $ sudo rpi-update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** Performing self-update
 *** Relaunching after update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** We're running for the first time
 *** Backing up files (this will take a few minutes)
 *** Backing up firmware
 *** Backing up modules 5.4.72-v7l+
#############################################################
WARNING: This update bumps to rpi-5.4.y linux tree
See: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769

'rpi-update' should only be used if there is a specific
reason to do so - for example, a request by a Raspberry Pi
engineer or if you want to help the testing effort
and are comfortable with restoring if there are regressions.

DO NOT use 'rpi-update' as part of a regular update process.

##############################################################
Would you like to proceed? (y/N)
 *** Downloading specific firmware revision (this will take a few minutes)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   168  100   168    0     0   1631      0 --:--:-- --:--:-- --:--:--  1647
100  117M    0  117M    0     0  4139k      0 --:--:--  0:00:29 --:--:-- 2737k
 *** Updating firmware
 *** Updating kernel modules
 *** depmod 5.4.77-v7+
 *** depmod 5.4.77+
 *** depmod 5.4.77-v8+
 *** depmod 5.4.77-v7l+
 *** Updating VideoCore libraries
 *** Using HardFP libraries
 *** Updating SDK
 *** Running ldconfig
 *** Storing current firmware revision
 *** Deleting downloaded files
 *** Syncing changes to disk
 *** If no errors appeared, your firmware was successfully updated to ab9d6874ff67f7ef015d04358ad1e7711abe3f20
 *** A reboot is needed to activate the new firmware

Issue still persists.

2. Ubuntu 64 installed with Noobs
No logs saved but same usb error messages as in Raspberry Pi OS 32.

3. Raspberry Pi OS 32 installed with Raspberry Imager (can't recall if it was the image from May or August)
No logs saved but same usb error messages as before.

4. Raspberry Pi OS 64 installed with Raspberry Imager (2020-08-20-raspios-buster-arm64)
Stock version from image, no update etc.
No logs saved but there where no usb errors, usb was working fine!

5. Raspberry Pi OS 32 installed with Raspberry Imager (still can't recall if it was the image from May or August)
No logs saved but same usb error messages as before...

I was told in the official forum to install the 64 version again and run another full upgrade and then switch back to 32 and check if it's ok.

6. Raspberry Pi OS 64 installed with Raspberry Imager (2020-08-20-raspios-buster-arm64)

I updated it with apt update and apt full-upgrade


pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.4.72-v8+ #1356 SMP PREEMPT Thu Oct 22 13:58:52 BST 2020 aarch64 GNU/Linux
pi@raspberrypi:~ $ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 3: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 3: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
pi@raspberrypi:~ $ usb-devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 1
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=05.04
S:  Manufacturer=Linux 5.4.72-v8+ xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:01:00.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 4
D:  Ver= 2.10 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=2109 ProdID=3431 Rev=04.21
S:  Product=USB2.0 Hub
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=24ae ProdID=1001 Rev=01.07
S:  Manufacturer=MOSART Semi.
S:  Product=Rapoo 2.4G Wireless Touch Desktop
C:  #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=100mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid
I:  If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 4
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev=05.04
S:  Manufacturer=Linux 5.4.72-v8+ xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:01:00.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

dmesg2.txt

Then I swapped the cards

7. Raspberry Pi OS 32 installed with Raspberry Imager (2020-08-20-raspios-buster-armhf)

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.4.51-v7l+ #1333 SMP Mon Aug 10 16:51:40 BST 2020 armv7l GNU/Linux
pi@raspberrypi:~ $ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
pi@raspberrypi:~ $ sudo usb-devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 1
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=05.04
S:  Manufacturer=Linux 5.4.51-v7l+ xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:01:00.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 4
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev=05.04
S:  Manufacturer=Linux 5.4.51-v7l+ xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:01:00.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

dmesg3.txt

After a full-upgrade also still not working

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.4.72-v7l+ #1356 SMP Thu Oct 22 13:57:51 BST 2020 armv7l GNU/Linux

pi@raspberrypi:~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

pi@raspberrypi:~ $ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
pi@raspberrypi:~ $ usb-devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 1
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=05.04
S:  Manufacturer=Linux 5.4.72-v7l+ xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:01:00.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 4
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev=05.04
S:  Manufacturer=Linux 5.4.72-v7l+ xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:01:00.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

dmesg4.txt

Still not working.

FWIW dmesg from Noobs (in addition a usb drive was attached and correctly recognised)
dmesg5.txt

@fopinski
Copy link
Author

fopinski commented Nov 27, 2020

The only thing that helps running the 32 bit version is using arm_64bit=1 in /boot/config.txt
But that would be kind of far away from the goal of running a 32 system :-)

popcornmix pushed a commit that referenced this issue Dec 1, 2020
Robin Murphy pointed out that if the arm-smmu driver probes before
the qcom_scm driver, we may call qcom_scm_qsmmu500_wait_safe_toggle()
before the __scm is initialized.

Now, getting this to happen is a bit contrived, as in my efforts it
required enabling asynchronous probing for both drivers, moving the
firmware dts node to the end of the dtsi file, as well as forcing a
long delay in the qcom_scm_probe function.

With those tweaks we ran into the following crash:
[    2.631040] arm-smmu 15000000.iommu:         Stage-1: 48-bit VA -> 48-bit IPA
[    2.633372] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
...
[    2.633402] [0000000000000000] user address but active_mm is swapper
[    2.633409] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[    2.633415] Modules linked in:
[    2.633427] CPU: 5 PID: 117 Comm: kworker/u16:2 Tainted: G        W         5.10.0-rc1-mainline-00025-g272a618fc36-dirty #3971
[    2.633430] Hardware name: Thundercomm Dragonboard 845c (DT)
[    2.633448] Workqueue: events_unbound async_run_entry_fn
[    2.633456] pstate: 80c00005 (Nzcv daif +PAN +UAO -TCO BTYPE=--)
[    2.633465] pc : qcom_scm_qsmmu500_wait_safe_toggle+0x78/0xb0
[    2.633473] lr : qcom_smmu500_reset+0x58/0x78
[    2.633476] sp : ffffffc0105a3b60
...
[    2.633567] Call trace:
[    2.633572]  qcom_scm_qsmmu500_wait_safe_toggle+0x78/0xb0
[    2.633576]  qcom_smmu500_reset+0x58/0x78
[    2.633581]  arm_smmu_device_reset+0x194/0x270
[    2.633585]  arm_smmu_device_probe+0xc94/0xeb8
[    2.633592]  platform_drv_probe+0x58/0xa8
[    2.633597]  really_probe+0xec/0x398
[    2.633601]  driver_probe_device+0x5c/0xb8
[    2.633606]  __driver_attach_async_helper+0x64/0x88
[    2.633610]  async_run_entry_fn+0x4c/0x118
[    2.633617]  process_one_work+0x20c/0x4b0
[    2.633621]  worker_thread+0x48/0x460
[    2.633628]  kthread+0x14c/0x158
[    2.633634]  ret_from_fork+0x10/0x18
[    2.633642] Code: a9034fa0 d0007f73 29107fa0 91342273 (f9400020)

To avoid this, this patch adds a check on qcom_scm_is_available() in
the qcom_smmu_impl_init() function, returning -EPROBE_DEFER if its
not ready.

This allows the driver to try to probe again later after qcom_scm has
finished probing.

Reported-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Andy Gross <agross@kernel.org>
Cc: Maulik Shah <mkshah@codeaurora.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Saravana Kannan <saravanak@google.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Lina Iyer <ilina@codeaurora.org>
Cc: iommu@lists.linux-foundation.org
Cc: linux-arm-msm <linux-arm-msm@vger.kernel.org>
Link: https://lore.kernel.org/r/20201112220520.48159-1-john.stultz@linaro.org
Signed-off-by: Will Deacon <will@kernel.org>
@fopinski
Copy link
Author

fopinski commented Dec 4, 2020

I installed 5.10 to get the referenced driver but still no USB working:
Linux raspberrypi 5.10.0-rc6-v7l+ #1 SMP Fri Dec 4 20:52:04 CET 2020 armv7l GNU/Linux

raspinfo2.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant