Penta Sata Hat on rpi 5 stopped working

After many months of rock-solid operation, my penta sata hat has stopped working. I’m using it on. Raspberry pi 5, Debian bookworm, 6.12.87 kernel. The sata controller is still mentioned in lspci, but the disks are not seen by the system.

I haven’t found anything useful with dmesg or journalctl. Will look at recent updates, but not sure where else to look..

I was building a NAX with the SATA hat and Pi 5. I’ve been through the setup a million times because all the instructions I’ve found are slightly off.

I finally got it going. I got the array made, formatted and then mounted. I could see the disks everything’s looking good

I ran sudo apt update, then sudo apt upgrade, rebooted and I have no disks. It has done this twice. I have to start all over again. I see you used bookworm so it’s not a Trixie issue (or whatever they call the latest version in imager).

There has to be a fix for this. Not upgrading seems like a really bad idea. Oh, one time I tried doing the update/upgrade before adding the PCI line in config. Drives never came up.

I found a fix. I had ‘gemini’ help me.

there is an active discussion regarding this exact issue. If your Radxa Penta SATA HAT recently stopped recognizing your hard drives or SSDs following a standard sudo apt update && sudo apt upgrade, it is a known regression caused by recent Linux kernel updates on the Raspberry Pi 5.

1. The Drives are Missing (Kernel 6.18+ / DMA Issue)Recent user reports on Reddit’s r/raspberry_pi and r/homelab outline that updating to the newer Linux kernel (such as 6.18) causes the JMB585 PCIe-to-SATA controller on the HAT to break because of memory allocation changes and strict 64-bit DMA requirements.The Fix:You need to explicitly force the Pi 5 to use a 32-bit DMA width for that PCIe lane.

Open your configuration file:Bashsudo nano /boot/firmware/config.txt

Add the following line at the bottom of the file:Plaintextdtoverlay=pcie-32bit-dma-pi5
Save, exit, and reboot your Pi. Your drives should reappear natively under lsblk.

https://www.reddit.com/r/raspberry_pi/comments/1tcw7tw/radxa_sata_hat_does_not_work_on_the_newer_kernel/

@setq maybe add this to the documentation?