rpi4 4GB: aarch64 - kernel upgrade from 5.4.28 to 5.4.32 does not detect sd card, xhci_hcd usb storage devices, cannot load firmware and init clocks unless memory is limited to 1GB

Open
#3,572 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
linux

Research direction

Start with the attached rpi4-failure-dmesg.txt and compare the rpi-5.4.y kernel builds at 5.4.28 and the reported 5.4.32-era commit, focusing on the SD, xhci_hcd, firmware, and clock errors. Reproduce the build and boot steps on a 4GB Raspberry Pi 4; done means the system boots with the SD card and USB storage recognized without limiting memory to 1GB.

Written by the indexing model from the issue text.

Description

Describe the bug
sd card is no longer recognized, a lot of errors:
Failed to get clock (-22)
xhci_hcd 0000:01:00.0: ERROR: unexpected setup context command completion code 0x11.
Mismatch between completed Set TR Deq Ptr command & xHCI internal state.
...

To reproduce
1.) clone the latest release of the kernel from rpi-5.4.y branch, currently pointing to: 5eab66dbeb358608e04907a9ed0058d004b84bc7
2.) run make oldconfig, accept the two changes and compile.
3.) Install the new kernel, device tree blobs and kernel modules
4.) reboot and observe the problem

Expected behaviour
Expected the system to boot fine, able to recognize the sd card

Actual behaviour
sd card is not recognized, system is sluggish

System
Copy and paste the results of the raspinfo command in to this section. Alternatively, copy and paste a pastebin link, or add answers to the following questions:

  • Which model of Raspberry Pi? e.g. Pi4 4GB
  • Which OS and version? GNU/Gentoo Linux, aarch64
  • Which firmware version (vcgencmd version)? vcgencmd does not work on aarch64, firmware is latest version
  • Which kernel version (uname -a)? 5.4.28-v8+

Logs
dmesg output attached.
rpi4-failure-dmesg.txt

Additional context
As per the logs, the root is on external usb disk, attached via UAS, thus booting is partially successful.
I also tried to switch to the kms for pi4 as seen in the log above, but this is not relevant for the sd card recognition:
dtoverlay=vc4-kms-v3d-pi4
dtoverlay=rpivid-v4l2

same problem still occurs with:
dtoverlay=vc4-fkms-v3d,cma-512

Thanks!

Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.