-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 5 NVMe using PCIe not working with kernel 6.6.x #5873
Comments
Is the drive you are using in this compatibility list? https://shop.pimoroni.com/products/nvme-base?variant=41219587178579 |
On RPiOS can you run update to 6.6 kernel and confirm you see the same failure as you do on Arch? |
Updated and it works:
Do you have suggestions for Arch Linux ARM guys to better investigate the issue? |
Could the issue be that other package is not providing something needed? ArchARM ships RPiOS bcm2712_defconfig as our baseline config. We add a few modules and settings but the basis set is there. I do not have NVMe hardware for testing on my RPi5/ArchARM and have no experience using these devices.
|
Yes, with that kernel the device works:
|
@teoteo : So glad you've opened this issue... my NVMe hardware (also fm Pimoroni) is to be delivered this week! |
OK, so something in the options we add to bcm2712_defconfig is causing the problem. The added options are here. At first glance, I did not see anything obviously to blame. @popcornmix @pelwell - do you have any thoughts? The modified .config is generated like this:
For reference, the following commit illustrates the fully expanded .config highlighting the difference between RPiOS's bcm2712_defconfig and the one that is apparently to blame for the reported issue: graysky2/PKGBUILDs@4846daa Again, I am not seeing any smoking gun. Grateful for any thought you may have. |
I've just hit this with rpi-update - compare pull/5882 with 6.1.74 -> bootloader probes NVMe, Linux fails to establish a link. On 6.1.74, Linux probes fine. |
Reverting this hunk which changed between 6.1 and 6.6 fixes things for me.
So, MDIO prodding broke - but why does RP1 still work? |
i.e. this commit: ca5dcc7 |
Does the switch from |
I think the bug is doing readw into a u32 then testing the top bit for "done", and exiting if it's 0. This means writes done in rapid succession will collide. |
Yes, the readw looks like a typo/thinko (w = word). So you just want: - err = readw_poll_timeout_atomic(base + PCIE_RC_DL_MDIO_WR_DATA, data,
+ err = readl_poll_timeout_atomic(base + PCIE_RC_DL_MDIO_WR_DATA, data,
MDIO_WT_DONE(data), 10, 100); |
Yep that fixes it. |
Just push your patch. |
Include:
|
That would have been on a 6.1 kernel, which hasn't received the offending patch. |
But then:
I can't explain that. |
I would like to thank anyone here. Really appreciate this has been resolved thanks to collective efforts! |
I did some testing and it works on my system. Thank you all.
|
Is this fix something that can help with the other NVMe-not-working cases for the normal RPI Debian? |
Describe the bug
Connecting an NVMe SSD using the Pimoroni "NVMe Base for Raspberry Pi 5" on Arch Linux ARM with kernel versions prior to 6.6.x not on versions 6.6.9 and higher.
Steps to reproduce the behaviour
Using Arch Linux (in my case AstroArch) with connected a PCIe extension board with NVMe SSD connected.
lsblk
I can see the SSDlsblk
I can’t see the SSDsudo pacman -U https://alaa.ad24.cz/packages/l/linux-rpi/linux-rpi-6.1.70-1-aarch64.pkg.tar.xz
and rebootlsblk
I can see the SSDDevice (s)
Raspberry Pi 5
System
OS: Arch Linux ARM aarch64
Host: Raspberry Pi 5 Model B Rev 1.0
vcgencmd not available
Kernel: Linux astroarch 6.6.12-1-rpi #1 SMP PREEMPT Wed Jan 17 19:05:39 MST 2024 aarch64 GNU/Linux
Logs
No response
Additional context
I’ve tried with different kernels and with kernels after 6.6.x (linux-rpi-16k too) can’t see the SSD.
Asking on Arch Linux ARM forum don’t seems to be a modules issue.
The text was updated successfully, but these errors were encountered: