You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test SATA adapter (I/O Crest 4 port Marvell 9215) #1
For those wanting to know about PCI-e compatibility, I have one here with a Pericom PI7C9X 1 to 3 way PCI-e bridge, and Marvell 9215 4 port SATA card connected to that. (My VL805 USB3 card is still to be delivered). With a couple of extra kernel modules enabled (mainly CONFIG_ATA, and CONFIG_SATA_AHCI) it's the basis of my next NAS.
<24W with a pair of 8TB SATA drives spinning and a 240GB SSD. <10W with the spinning rust in standby.
And... I just realized I have no SATA power supply cable, just the data cable. So I'll have to wait for one of those to come in before I can actually test one of my SATA drives.
I just increased the BAR allocation following the directions in this Gist, but when I rebooted (without the card in), I got:
[ 0.926161] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[ 0.926184] brcm-pcie fd500000.pcie: No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
[ 0.926247] brcm-pcie fd500000.pcie: MEM 0x0600000000..0x063fffffff -> 0x00c0000000
[ 0.926312] brcm-pcie fd500000.pcie: IB MEM 0x0000000000..0x00ffffffff -> 0x0100000000
[ 1.521386] brcm-pcie fd500000.pcie: link down
Powering off completely, then booting again, it works. So note to self: if you get a link down, try a hard power reset instead of reboot.
Ah... looking closer, those 'failed to assign' errors are for IO BARs, which are unsupported on the Pi.
So... I posted in the BAR space thread on Pi Forums asking 6by9 if that user has had the same logs and if they can be safely ignored. Still waiting on a way to power my drive so I can do an end-to-end test :)
something else that may be interesting is if you can get a sas adapter/raid card working. I know I was looking into SBCs w/ pcie awhile back for the purpose of building a low power/low heat host for some sas drives I have. (ended up just throwing it in a computer and not running 24/7)
That would be an interesting thing to test, though it'll have to wait a bit as I'm trying to get through some other cards and might also test 2.5 Gbps or 5 Gbps networking if I am able to!
# Install dependencies
sudo apt install -y git bc bison flex libssl-dev make libncurses5-dev
# Clone source
git clone --depth=1 https://github.com/raspberrypi/linux
# Apply default configurationcd linux
export KERNEL=kernel7l # use kernel8 for 64-bit, or kernel7l for 32-bit
make bcm2711_defconfig
# Customize the .config further with menuconfig
make menuconfig
# Enable the following:# Device Drivers:# -> Serial ATA and Parallel ATA drivers (libata)# -> AHCI SATA support# -> Marvell SATA support## Alternatively add the following in .config manually:# CONFIG_ATA=m# CONFIG_ATA_VERBOSE_ERROR=y# CONFIG_SATA_PMP=y# CONFIG_SATA_AHCI=m# CONFIG_SATA_MOBILE_LPM_POLICY=0# CONFIG_ATA_SFF=y# CONFIG_ATA_BMDMA=y# CONFIG_SATA_MV=m
nano .config
# (edit CONFIG_LOCALVERSION and add a suffix that helps you identify your build)# Build the kernel and copy everything into place
make -j4 zImage modules dtbs # 'Image' on 64-bit
sudo make modules_install
sudo cp arch/arm/boot/dts/*.dtb /boot/
sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/
sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/
sudo cp arch/arm/boot/zImage /boot/$KERNEL.img
Reacted by Kerman, HZ1, doctorseus, agentd00nut, stamaali4, Scania01, p-doyle, l0gical and Michał Ciesielski
sudo fdisk /dev/sda
d 1 # delete partition 1
d 2 # delete partition 2
n # create new partition
p # primary (default)
1 # partition 1 (default)
2048 # First sector (default)
468862127 # Last sector (default)
w # write new partition table
Got the following:
The partition table has been altered.
Failed to remove partition 1 from system: Device or resource busy
Failed to remove partition 2 from system: Device or resource busy
Failed to add partition 1 to system: Device or resource busy
The kernel still uses the old partitions. The new table will be used at the next reboot.
Syncing disks.
Rebooted the Pi, then:
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 223.6G 0 disk
└─sda1 8:1 1 223.6G 0 part
mmcblk0 179:0 0 29.8G 0 disk
├─mmcblk0p1 179:1 0 256M 0 part /boot
└─mmcblk0p2 179:2 0 29.6G 0 part /
"You might also try adding "extraargs=pcie_aspm=off" to your cmdline.txt to turn off PCIe power management."
I may also try this, my 9215 works absolutely fine with 3x SATA 8TB Drives, the only issue I get occasionally is the drive power down/up sound and a couple of the disks change from say SDA/SDC to SDD/SDE, it does however break OMV when that happens.
The 9230 card runs well aside from a lack of any way to change the RAID config.
Does this mean, there is no CLI to enable/change hardware RAID modes?
That is correct. The Marvell hardware RAID config (MRU) is available only for x86/x64 processors.
You can put the card into a Windows or Linux PC, connect the disks you plan to use, configure RAID, and then move the card to your Pi setup. You might even be able to have a 9230-based card in the PC and just move the disks since the RAID config is stored on the drives themselves, not on the card.
This is probably fine if you just wanted to use striping or Hyperduo SSD caching, but if you want redundancy you will have no indication that a mirror has failed.
I'm testing an ASM1061R based controller basically identical with these
Setup is identical to your description below
put the card into a Windows or Linux PC, connect the disks you plan to use, configure RAID, and then move the card to your Pi setup. You might even be able to have a 9230-based card in the PC and just move the disks since the RAID config is stored on the drives themselves, not on the card.
Issue:
if you want redundancy you will have no indication that a mirror has failed.
is affecting my controller too and was even confirmed by distributor's technical support in this FAQ
"Question:
I did not find a way to get a alert if a disk in a raid-1 set fails. the controller does not even stop the POST processes when a disk failed. I would expected that some RED blinking WARNING comes up or something and the PC only continues the POST if the degraded raid status gets committed. Documentation is very very poor..
Answer:
Hello Kalle,
thanks for your request. We're are sorry, that's the way this product works.
Kind regrads
InLine Support Team"
@geerlingguy should such severe limitations not be documented in the "Raspberry Pi PCI Express device compatibility database" ?
I have some questions in to Raspberry Pi surrounding SATA support, and PCIe link quality. It seems like both cards I've tested run into some errors (more so than I get with NVMe...).
Please excuse the sketchy setup - just wanted to quickly test.
$ lspci
0000:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries Device 2712 (rev 21)
0000:01:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9215 PCIe 2.0 x1 4-port SATA 6 Gb/s Controller (rev 11)
0001:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries Device 2712 (rev 21)
0001:01:00.0 Ethernet controller: Device 1de4:0001
And connected 4 drives (these are old HDDs that have various partitions on):
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 1 698.6G 0 disk
└─sda1 8:1 1 698.6G 0 part /mnt/sda
sdb 8:16 1 698.6G 0 disk
└─sdb1 8:17 1 698.6G 0 part /mnt/sdb
sdc 8:32 1 111.8G 0 disk
├─sdc1 8:33 1 512M 0 part
├─sdc2 8:34 1 513M 0 part
├─sdc3 8:35 1 1K 0 part
└─sdc5 8:37 1 110.8G 0 part /mnt/sdc
sdd 8:48 1 465.8G 0 disk
└─sdd1 8:49 1 465.8G 0 part
mmcblk0 179:0 0 58.9G 0 disk
├─mmcblk0p1 179:1 0 512M 0 part /boot/firmware
└─mmcblk0p2 179:2 0 58.4G 0 part /
And successfully mounted all except sdd which seems to be a dead HDD (although looking at the pic in retrospect the SATA cable doesn't look to be fully seated 🤷 )
I just installed a ASMedia ASM1064 4 Port SATA III Card onto a P02 PCIe Adapter Board and it was detected immediately upon boot:
pi@NAS-Pi:~ $ lspci
0000:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
0000:01:00.0 SATA controller: ASMedia Technology Inc. ASM1064 Serial ATA Controller (rev 02)
0001:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
0001:01:00.0 Ethernet controller: Raspberry Pi Ltd RP1 PCIe 2.0 South Bridge
However, I can't seem to get the Pi to see the drive that I have plugged into it. Should I recompile the kernel or am I having a different problem?
[EDIT]
checking my logs, I see messages for the AHCI controller being unavailable:
Yes, but I used an SSD, so I can't really tell if the drive is powering up. I'll use a normal SATA drive tomorrow, and try again with a different PSU and buck converters. I'll post my results.
I retried today with an ATX PSU to power the drive. I used a normal SATA HDD so that I could feel if it was spinning. The drive was sort of seen:
3.864156] ata24: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082c80 irq 168
[ 7.002270] ata1: found unknown device (class 0)
[ 7.007153] ata1: SATA link down (SStatus 0 SControl 300)
But I think that my problem is here:
pi@NAS-Pi:~ $ dmesg | grep -iC 3 "sata"
[ 3.584292] ahci 0000:01:00.0: version 3.0
[ 3.584315] ahci 0000:01:00.0: enabling device (0000 -> 0002)
[ 3.590658] ahci 0000:01:00.0: SSS flag set, parallel bus scan disabled [ 3.597727] ahci 0000:01:00.0: AHCI 0001.0301 32 slots 24 ports 6 Gbps 0xffff0f impl SATA mode
[ 3.606772] ahci 0000:01:00.0: flags: 64bit ncq sntf stag pm led only pio slum part deso sadm sds
The card that I am using only has 4 ports, yet for some reason the Pi is seeing 24 ports. I'm going to see if there are any drivers or maybe a source code available.
> # Build the kernel and copy everything into place
> make -j4 zImage modules dtbs # 'Image' on 64-bit
> sudo make modules_install
> sudo cp arch/arm/boot/dts/*.dtb /boot/
> sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/
> sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/
> sudo cp arch/arm/boot/zImage /boot/$KERNEL.img
@geerlingguy I'm trying to compile the kernel as you described. However, when I get to "sudo cp arch/arm/boot/dts/*.dtb /boot/" I get an error:
pi@NAS-Pi:~/linux $ sudo cp arch/arm/boot/dts/*.dtb /boot/
cp: cannot stat 'arch/arm/boot/dts/*.dtb': No such file or directory
Any suggestions?
Docs from Raspberry Pi on building the kernel are at https://www.raspberrypi.com/documentation/computers/linux_kernel.html#native-build
Between 6.1 and 6.6 all the Broadcom DT files for arm32 moved into arch/arm/boot/dts/broadcom. The copy command has to be updated to match, and is in the Pi docs. (arm64 DT files have always been in arch/arm/64/boot/dts/broadcom).
I'm fairly certain that the relevant modules for the Marvell SATA cards are enabled in the default Pi kernels, so there is no need to rebuild the kernel yourself for that reason.
Activity
geerlingguy commentedon Oct 22, 2020
I'm going to try out the IO Crest 4-port SATA adapter.
Issue #1: Add SATA Adapter that I'm currently testing.
geerlingguy commentedon Oct 24, 2020
It has arrived!
geerlingguy commentedon Oct 24, 2020
And... I just realized I have no SATA power supply cable, just the data cable. So I'll have to wait for one of those to come in before I can actually test one of my SATA drives.
geerlingguy commentedon Oct 24, 2020
First light is good:
geerlingguy commentedon Oct 24, 2020
Though
dmesgshows that it's hitting BAR default address space limits again:geerlingguy commentedon Oct 24, 2020
I just increased the BAR allocation following the directions in this Gist, but when I rebooted (without the card in), I got:
Powering off completely, then booting again, it works. So note to self: if you get a
link down, try a hard power reset instead ofreboot.geerlingguy commentedon Oct 24, 2020
Ah... looking closer, those 'failed to assign' errors are for IO BARs, which are unsupported on the Pi.
So... I posted in the BAR space thread on Pi Forums asking 6by9 if that user has had the same logs and if they can be safely ignored. Still waiting on a way to power my drive so I can do an end-to-end test :)
kitlith commentedon Oct 27, 2020
something else that may be interesting is if you can get a sas adapter/raid card working. I know I was looking into SBCs w/ pcie awhile back for the purpose of building a low power/low heat host for some sas drives I have. (ended up just throwing it in a computer and not running 24/7)
geerlingguy commentedon Oct 27, 2020
That would be an interesting thing to test, though it'll have to wait a bit as I'm trying to get through some other cards and might also test 2.5 Gbps or 5 Gbps networking if I am able to!
[-]Test SATA adapter(s)[/-][+]Test SATA adapter (I/O Crest 4 port Marvell 9215)[/+]geerlingguy commentedon Oct 27, 2020
Without the kernel modules enabled,
lsblkshows no device:Going to try adding those modules and see what happens!
geerlingguy commentedon Oct 27, 2020
geerlingguy commentedon Oct 28, 2020
Yahoo, it worked!
geerlingguy commentedon Oct 28, 2020
Repartitioning the drive:
Got the following:
Rebooted the Pi, then:
To format the device, use
mkfs:Then mount it somewhere:
58 remaining items
l0gical commentedon Oct 22, 2021
"You might also try adding "extraargs=pcie_aspm=off" to your cmdline.txt to turn off PCIe power management."
I may also try this, my 9215 works absolutely fine with 3x SATA 8TB Drives, the only issue I get occasionally is the drive power down/up sound and a couple of the disks change from say SDA/SDC to SDD/SDE, it does however break OMV when that happens.
mi-hol commentedon Dec 17, 2021
Does this mean, there is no CLI to enable/change hardware RAID modes?
BeauSlim commentedon Dec 19, 2021
That is correct. The Marvell hardware RAID config (MRU) is available only for x86/x64 processors.
You can put the card into a Windows or Linux PC, connect the disks you plan to use, configure RAID, and then move the card to your Pi setup. You might even be able to have a 9230-based card in the PC and just move the disks since the RAID config is stored on the drives themselves, not on the card.
This is probably fine if you just wanted to use striping or Hyperduo SSD caching, but if you want redundancy you will have no indication that a mirror has failed.
mi-hol commentedon Dec 19, 2021
I'm testing an ASM1061R based controller basically identical with these
Setup is identical to your description below
Issue:
is affecting my controller too and was even confirmed by distributor's technical support in this FAQ
"Question:
I did not find a way to get a alert if a disk in a raid-1 set fails. the controller does not even stop the POST processes when a disk failed. I would expected that some RED blinking WARNING comes up or something and the PC only continues the POST if the degraded raid status gets committed. Documentation is very very poor..
Answer:
Hello Kalle,
thanks for your request. We're are sorry, that's the way this product works.
Kind regrads
InLine Support Team"
@geerlingguy should such severe limitations not be documented in the "Raspberry Pi PCI Express device compatibility database" ?
geerlingguy commentedon Oct 13, 2023
Testing on the Raspberry Pi 5:
At PCIe Gen 2.0, I'm getting some link errors—but otherwise the card seems to pass through clean-ish at least:
I think the PCIe issues are down to the FFC cable and PCIe interference :(
geerlingguy commentedon Oct 13, 2023
I have some questions in to Raspberry Pi surrounding SATA support, and PCIe link quality. It seems like both cards I've tested run into some errors (more so than I get with NVMe...).
SorX14 commentedon Jan 4, 2024
Got my hands on a Pimoroni NVMe base and used a M.2 to PCIe adapter.
Please excuse the sketchy setup - just wanted to quickly test.
And connected 4 drives (these are old HDDs that have various partitions on):
And successfully mounted all except
sddwhich seems to be a dead HDD (although looking at the pic in retrospect the SATA cable doesn't look to be fully seated 🤷 )Running pibenchmark yields the following in hardware identification:
sda results: https://pibenchmarks.com/benchmark/76956/
sdb results: https://pibenchmarks.com/benchmark/76955/
sdc results: https://pibenchmarks.com/benchmark/76957/
sdd results: DNQ
I then ran two benchmarks in parallel on sda and sdc which both completed (didn't submit results).
All this to say that I think this card now works as expected. I was using the default PCIe link speed.
jamesy0ung commentedon Jun 23, 2024
For anyone looking to use this card on a CM4IO, I designed a bracket for it that keeps in in place, so it doesn't get loose and cause a system lockup.
https://www.printables.com/model/789947-cm4-si-pex40064-bracket/related
zogthegreat commentedon Sep 9, 2024
Hi everyone!
I just installed a ASMedia ASM1064 4 Port SATA III Card onto a P02 PCIe Adapter Board and it was detected immediately upon boot:
pi@NAS-Pi:~ $ lspci
0000:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
0000:01:00.0 SATA controller: ASMedia Technology Inc. ASM1064 Serial ATA Controller (rev 02)
0001:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
0001:01:00.0 Ethernet controller: Raspberry Pi Ltd RP1 PCIe 2.0 South Bridge
However, I can't seem to get the Pi to see the drive that I have plugged into it. Should I recompile the kernel or am I having a different problem?
[EDIT]
checking my logs, I see messages for the AHCI controller being unavailable:
pi@NAS-Pi:~ $ journalctl -p 0..3 -r
Sep 09 18:07:45 NAS-Pi bluetoothd[811]: sap-server: Operation not permitted (1)
Sep 09 18:07:45 NAS-Pi bluetoothd[811]: profiles/sap/server.c:sap_server_register() Sap driver initialization failed.
Sep 09 18:07:45 NAS-Pi wpa_supplicant[819]: nl80211: kernel reports: Registration to specific type not supported
Sep 09 18:07:44 NAS-Pi bluetoothd[811]: src/plugin.c:plugin_init() Failed to init bap plugin
Sep 09 18:07:44 NAS-Pi bluetoothd[811]: src/plugin.c:plugin_init() Failed to init mcp plugin
Sep 09 18:07:44 NAS-Pi bluetoothd[811]: src/plugin.c:plugin_init() Failed to init vcp plugin
Sep 09 18:07:43 NAS-Pi kernel: ahci 0000:01:00.0: AHCI controller unavailable!
Sep 09 18:07:43 NAS-Pi kernel: ahci 0000:01:00.0: AHCI controller unavailable!
Sep 09 18:07:43 NAS-Pi kernel: ahci 0000:01:00.0: AHCI controller unavailable!
Sep 09 18:07:43 NAS-Pi kernel: ahci 0000:01:00.0: AHCI controller unavailable!
Sep 09 18:07:43 NAS-Pi kernel: ahci 0000:01:00.0: AHCI controller unavailable!
Sep 09 18:07:43 NAS-Pi kernel: ahci 0000:01:00.0: AHCI controller unavailable!
pi@NAS-Pi:~ $ dmesg | grep -iC 3 "sata"
[ 3.274371] ahci 0000:01:00.0: enabling device (0000 -> 0002)
[ 3.285683] ahci 0000:01:00.0: SSS flag set, parallel bus scan disabled
[ 3.296822] input: pwr_button as /devices/platform/pwr_button/input/input1
[ 3.305594] ahci 0000:01:00.0: AHCI 0001.0301 32 slots 24 ports 6 Gbps 0xffff0f impl SATA mode
[ 3.316329] ahci 0000:01:00.0: flags: 64bit ncq sntf stag pm led only pio slum part deso sadm sds apst
[ 3.333651] scsi host0: ahci
[ 3.336915] scsi host1: ahci
[ 3.439277] scsi host23: ahci
[ 3.439597] ata1: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082100 irq 166
[ 3.481783] ata2: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082180 irq 166
[ 3.489888] ata3: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082200 irq 166
[ 3.497997] ata4: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082280 irq 166
[ 3.506108] ata5: DUMMY
[ 3.508687] ata6: DUMMY
[ 3.511266] ata7: DUMMY
[ 3.513841] ata8: DUMMY
[ 3.516433] ata9: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082500 irq 166
[ 3.524587] ata10: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082580 irq 166
[ 3.532858] ata11: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082600 irq 166
........... repeated entries cut ..................
[ 7.022355] ata1: found unknown device (class 0)
[ 7.027240] ata1: SATA link down (SStatus 0 SControl 300)
[ 7.344795] ata2: SATA link down (SStatus 0 SControl 300)
[ 8.048127] ata3: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[ 8.312022] ahci 0000:01:00.0: AHCI controller unavailable!
[ 8.607207] ahci 0000:01:00.0: AHCI controller unavailable!
[ 15.715690] ata4: failed to resume link (SControl FFFFFFFF)
[ 20.351100] ata4: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[ 22.093865] ahci 0000:01:00.0: AHCI controller unavailable!
[ 22.678491] ahci 0000:01:00.0: AHCI controller unavailable!
[ 30.655706] ata9: failed to resume link (SControl FFFFFFFF)
[ 35.291184] ata9: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[ 37.035697] ahci 0000:01:00.0: AHCI controller unavailable!
[ 37.620200] ahci 0000:01:00.0: AHCI controller unavailable!
[ 45.599690] ata10: failed to resume link (SControl FFFFFFFF)
[ 50.235158] ata10: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[ 51.977983] ahci 0000:01:00.0: AHCI controller unavailable!
[ 52.562453] ahci 0000:01:00.0: AHCI controller unavailable!
[ 60.539690] ata11: failed to resume link (SControl FFFFFFFF)
[ 65.175161] ata11: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[ 66.918030] ahci 0000:01:00.0: AHCI controller unavailable!
[ 67.502519] ahci 0000:01:00.0: AHCI controller unavailable!
[ 75.479691] ata12: failed to resume link (SControl FFFFFFFF)
[ 80.115143] ata12: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[ 81.857942] ahci 0000:01:00.0: AHCI controller unavailable!
........... repeated entries cut ..................
[ 146.630318] EXT4-fs (mmcblk0p2): mounted filesystem 56f80fa2-e005-4cca-86e6-19da1069914d ro with ordered data mode. Quota mode: none.
[ 147.524517] Segment Routing with IPv6
[ 147.528371] In-situ OAM (IOAM) with IPv6
[ 150.183706] ata17: failed to resume link (SControl FFFFFFFF)
[ 154.819196] ata17: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[ 156.562033] ahci 0000:01:00.0: AHCI controller unavailable!
[ 157.146544] ahci 0000:01:00.0: AHCI controller unavailable!
[ 165.123702] ata18: failed to resume link (SControl FFFFFFFF)
[ 169.759219] ata18: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[ 171.502060] ahci 0000:01:00.0: AHCI controller unavailable!
[ 172.086531] ahci 0000:01:00.0: AHCI controller unavailable!
[ 180.063689] ata19: failed to resume link (SControl FFFFFFFF)
[ 184.699163] ata19: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[ 186.441985] ahci 0000:01:00.0: AHCI controller unavailable!
........... repeated entries cut ..................
[ 261.141938] ahci 0000:01:00.0: AHCI controller unavailable!
[ 261.173976] systemd[1]: systemd 252.30-1~deb12u2 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
[ 261.207586] systemd[1]: Detected architecture arm64.
PixlRainbow commentedon Sep 10, 2024
@zogthegreat
I wonder if that might be the drive having trouble powering on? Is it being powered from an external PSU?
zogthegreat commentedon Sep 10, 2024
Yes, but I used an SSD, so I can't really tell if the drive is powering up. I'll use a normal SATA drive tomorrow, and try again with a different PSU and buck converters. I'll post my results.
zogthegreat commentedon Sep 10, 2024
I retried today with an ATX PSU to power the drive. I used a normal SATA HDD so that I could feel if it was spinning. The drive was sort of seen:
3.864156] ata24: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082c80 irq 168
[ 7.002270] ata1: found unknown device (class 0)
[ 7.007153] ata1: SATA link down (SStatus 0 SControl 300)
But I think that my problem is here:
pi@NAS-Pi:~ $ dmesg | grep -iC 3 "sata"
[ 3.584292] ahci 0000:01:00.0: version 3.0
[ 3.584315] ahci 0000:01:00.0: enabling device (0000 -> 0002)
[ 3.590658] ahci 0000:01:00.0: SSS flag set, parallel bus scan disabled
[ 3.597727] ahci 0000:01:00.0: AHCI 0001.0301 32 slots 24 ports 6 Gbps 0xffff0f impl SATA mode
[ 3.606772] ahci 0000:01:00.0: flags: 64bit ncq sntf stag pm led only pio slum part deso sadm sds
The card that I am using only has 4 ports, yet for some reason the Pi is seeing 24 ports. I'm going to see if there are any drivers or maybe a source code available.
zogthegreat commentedon Sep 10, 2024
@geerlingguy I'm trying to compile the kernel as you described. However, when I get to "sudo cp arch/arm/boot/dts/*.dtb /boot/" I get an error:
Any suggestions?
[EDIT]
Here is what's in my arch/arm/boot/dts directory after compiling:
6by9 commentedon Sep 11, 2024
Docs from Raspberry Pi on building the kernel are at https://www.raspberrypi.com/documentation/computers/linux_kernel.html#native-build
Between 6.1 and 6.6 all the Broadcom DT files for arm32 moved into arch/arm/boot/dts/broadcom. The copy command has to be updated to match, and is in the Pi docs. (arm64 DT files have always been in arch/arm/64/boot/dts/broadcom).
I'm fairly certain that the relevant modules for the Marvell SATA cards are enabled in the default Pi kernels, so there is no need to rebuild the kernel yourself for that reason.
geerlingguy commentedon Nov 22, 2024
Also debugging a similar error over here: #85
The answer according to raspberrypi/linux#6214 is to add the following lines to
/boot/firmware/config.txtand reboot: