* Marvel 88SE6121 fails with SATA-2/3 HDDs @ 2023-01-25 13:23 Hajo Noerenberg 2023-01-26 0:34 ` Damien Le Moal 0 siblings, 1 reply; 7+ messages in thread From: Hajo Noerenberg @ 2023-01-25 13:23 UTC (permalink / raw) To: linux-ide; +Cc: Pali Rohár, damien.lemoal Bug report for Seagate Blackarmor NAS440 with Marvel 88SE6121 controller (AHCI kernel module): Very old SATA-1 HDDs (mostly laptop HDDs in my tests) work flawlessly, SATA-2/3 consistently fail. Limiting SATA speed (libata.force=1.5G ...) does not help. Interestingly, SATA-2/3 HDDs do work with U-Boot and 'ancient' 3.x kernels. There was a suspicion that it was the PCI subsystem (the change in kernel 3.16 from kirkwood/pci.c to mvebu-pci). Pali Rohár did a great job to investigate this problem very persistently, but in the end we did not find a solution. Without knowing anything about this area, there was the assumption that the problem must be at one of the lower levels close to the hardware. During some older tests with kernel 5.x I tried to re-integrate a modification from the Seagate vendor 2.6 kernel annotated there with "set 6121 Transmitter Pre-Emphasis to 4", but this did not change anything (but it may be that I didn't do it right). You can find all the details and a lot of logs in Bug https://bugzilla.kernel.org/show_bug.cgi?id=216094 Please find [1] U-Boot and [2] Kernel (vanilla 6.2.0-rc5) logs attached, with: 88SE6121-port0 is a SATA-2 ST3500418AS (works with u-boot, fails with linux kernel >3.16) 88SE6121-port1 is a SATA-1 ST3250310NS (always works) 88SE6121-port2 is (unused / not wired) PATA (during my tests I tried other SATA-1/2/3 drives to rule out a problem with a specific drive or vendor) I've been trying to resurrect my NAS440 for over 10 years with all the components (https://github.com/hn/seagate-blackarmor-nas), so I have the hardware available and am happy to persevere to try things or otherwise help. Hajo [1] U-Boot Log nas440> version U-Boot 2022.04 (Apr 11 2022 - 15:58:53 +0200) NAS 440 nas440> pci enum pcie0.0: Link up nas440> scsi reset Reset SCSI scanning bus for devices... Target spinup took 0 ms. Target spinup took 0 ms. SATA link 2 timeout. AHCI 0001.0000 32 slots 3 ports 3 Gbps 0x7 impl SATA mode flags: 64bit ncq stag led pmp slum part Device 0: (0:0) Vendor: ATA Prod.: ST3500418AS Rev: CC38 Type: Hard Disk Capacity: 476940.0 MB = 465.7 GB (976773168 x 512) Device 1: (1:0) Vendor: ATA Prod.: ST3250310NS Rev: SN04 Type: Hard Disk Capacity: 238475.1 MB = 232.8 GB (488397168 x 512) nas440> scsi part 0 Partition Map for SCSI device 0 -- Partition Type: DOS Part Start Sector Num Sectors UUID Type 1 2048 209715200 cba79dc0-01 83 2 209717248 767055920 cba79dc0-02 eb nas440> ext2ls scsi 0:1 <DIR> 4096 . <DIR> 4096 .. <DIR> 16384 lost+found 568888832 foo [2] U-Boot Log root@nas440:~# uname -a Linux nas440 6.2.0-rc5 #1 Tue Jan 24 23:41:07 CET 2023 armv5tel GNU/Linux root@nas440:~# modprobe pci-mvebu [ 208.588347] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges: [ 208.597651] mvebu-pcie mbus@f1000000:pcie@82000000: MEM 0x00f1040000..0x00f1041fff -> 0x0000040000 [ 208.611351] mvebu-pcie mbus@f1000000:pcie@82000000: MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000 [ 208.621380] mvebu-pcie mbus@f1000000:pcie@82000000: IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000 [ 208.641381] mvebu-pcie mbus@f1000000:pcie@82000000: pcie0.0: legacy INTx interrupts cannot be masked individually, /mbus@f1000000/pcie@82000000/pcie@1,0 does not contain intx interrupt [ 208.667286] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00 [ 208.684189] pci_bus 0000:00: root bus resource [bus 00-ff] [ 208.689802] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff]) [ 208.705363] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff] [ 208.712352] pci_bus 0000:00: root bus resource [io 0x1000-0xeffff] [ 208.723392] pci 0000:00:01.0: [11ab:6281] type 01 class 0x060400 [ 208.739782] PCI: bus0: Fast back to back transfers disabled [ 208.745470] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring [ 208.766397] pci 0000:01:00.0: [11ab:6121] type 00 class 0x01018f [ 208.772921] pci 0000:01:00.0: reg 0x10: [io 0xc0000000-0xc0000007] [ 208.779272] pci 0000:01:00.0: reg 0x14: [io 0xc0000008-0xc000000b] [ 208.785607] pci 0000:01:00.0: reg 0x18: [io 0xc0000010-0xc0000017] [ 208.791937] pci 0000:01:00.0: reg 0x1c: [io 0xc0000018-0xc000001b] [ 208.798267] pci 0000:01:00.0: reg 0x20: [io 0xc0000020-0xc000002f] [ 208.804598] pci 0000:01:00.0: reg 0x24: [mem 0x90000000-0x900003ff] [ 208.818936] pci 0000:01:00.0: supports D1 [ 208.823276] pci 0000:01:00.0: PME# supported from D0 D1 D3hot [ 208.840601] PCI: bus1: Fast back to back transfers disabled [ 208.846297] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01 [ 208.879294] pci 0000:00:01.0: BAR 8: assigned [mem 0xe0000000-0xe00fffff] [ 208.886183] pci 0000:00:01.0: BAR 7: assigned [io 0x10000-0x10fff] [ 208.901547] pci 0000:01:00.0: BAR 5: assigned [mem 0xe0000000-0xe00003ff] [ 208.908459] pci 0000:01:00.0: BAR 4: assigned [io 0x10000-0x1000f] [ 208.914896] pci 0000:01:00.0: BAR 0: assigned [io 0x10010-0x10017] [ 208.921238] pci 0000:01:00.0: BAR 2: assigned [io 0x10018-0x1001f] [ 208.927576] pci 0000:01:00.0: BAR 1: assigned [io 0x10020-0x10023] [ 208.933905] pci 0000:01:00.0: BAR 3: assigned [io 0x10024-0x10027] [ 208.940240] pci 0000:00:01.0: PCI bridge to [bus 01] [ 208.945257] pci 0000:00:01.0: bridge window [io 0x10000-0x10fff] [ 208.951596] pci 0000:00:01.0: bridge window [mem 0xe0000000-0xe00fffff] [ 208.992175] pcieport 0000:00:01.0: enabling device (0140 -> 0143) [ 209.007014] ahci 0000:01:00.0: Disabling your PATA port. Use the boot option 'ahci.marvell_enable=0' to avoid this. [ 209.017595] ahci 0000:01:00.0: controller can't do NCQ, turning off CAP_NCQ [ 209.024616] ahci 0000:01:00.0: controller can't do PMP, turning off CAP_PMP [ 209.031635] ahci 0000:01:00.0: masking port_map 0x7 -> 0x3 [ 209.067304] ahci 0000:01:00.0: SSS flag set, parallel bus scan disabled [ 209.074078] ahci 0000:01:00.0: AHCI 0001.0000 32 slots 3 ports 3 Gbps 0x3 impl IDE mode [ 209.082187] ahci 0000:01:00.0: flags: 64bit stag led slum part [ 209.107629] scsi host3: ahci [ 209.117716] scsi host4: ahci [ 209.131433] scsi host5: ahci [ 209.134706] ata3: SATA max UDMA/133 abar m1024@0xe0000000 port 0xe0000100 irq 39 [ 209.142214] ata4: SATA max UDMA/133 abar m1024@0xe0000000 port 0xe0000180 irq 39 [ 209.149676] ata5: DUMMY [ 209.469562] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 214.631228] ata3.00: qc timeout after 5000 msecs (cmd 0xec) [ 214.636919] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) [ 214.957579] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 225.127261] ata3.00: qc timeout after 10000 msecs (cmd 0xec) [ 225.133030] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) [ 225.139184] ata3: limiting SATA link speed to 1.5 Gbps [ 225.457616] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 310) [ 257.127404] ata3.00: qc timeout after 30000 msecs (cmd 0xec) [ 257.133181] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) [ 257.453758] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 310) [ 257.773761] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300) [ 257.781254] ata4.00: ATA-6: ST3250310NS, SN04, max UDMA/133 [ 257.786916] ata4.00: 488397168 sectors, multi 0: LBA48 NCQ (depth 0/32) [ 257.796826] ata4.00: configured for UDMA/133 [ 257.801537] scsi 4:0:0:0: Direct-Access ATA ST3250310NS SN04 PQ: 0 ANSI: 5 [ 257.820228] sd 4:0:0:0: [sdd] 488397168 512-byte logical blocks: (250 GB/233 GiB) [ 257.828149] sd 4:0:0:0: Attached scsi generic sg3 type 0 [ 257.843562] sd 4:0:0:0: [sdd] Write Protect is off [ 257.859628] sd 4:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 257.879625] sd 4:0:0:0: [sdd] Preferred minimum I/O size 512 bytes [ 257.918058] sdd: sdd1 sdd2 [ 257.920294] sd 4:0:0:0: [sdd] Attached SCSI disk ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Marvel 88SE6121 fails with SATA-2/3 HDDs 2023-01-25 13:23 Marvel 88SE6121 fails with SATA-2/3 HDDs Hajo Noerenberg @ 2023-01-26 0:34 ` Damien Le Moal 2023-01-26 15:41 ` Hajo Noerenberg 0 siblings, 1 reply; 7+ messages in thread From: Damien Le Moal @ 2023-01-26 0:34 UTC (permalink / raw) To: Hajo Noerenberg, linux-ide; +Cc: Pali Rohár On 2023/01/25 22:23, Hajo Noerenberg wrote: > > Bug report for Seagate Blackarmor NAS440 with Marvel 88SE6121 controller (AHCI kernel module): Very old SATA-1 HDDs (mostly laptop HDDs in my tests) work flawlessly, SATA-2/3 consistently fail. Limiting SATA speed (libata.force=1.5G ...) does not help. > > Interestingly, SATA-2/3 HDDs do work with U-Boot and 'ancient' 3.x kernels. There was a suspicion that it was the PCI subsystem (the change in kernel 3.16 from kirkwood/pci.c to mvebu-pci). Pali Rohár did a great job to investigate this problem very persistently, but in the end we did not find a solution. > > Without knowing anything about this area, there was the assumption that the problem must be at one of the lower levels close to the hardware. > > During some older tests with kernel 5.x I tried to re-integrate a modification from the Seagate vendor 2.6 kernel annotated there with "set 6121 Transmitter Pre-Emphasis to 4", but this did not change anything (but it may be that I didn't do it right). > > You can find all the details and a lot of logs in Bug https://bugzilla.kernel.org/show_bug.cgi?id=216094 > > Please find [1] U-Boot and [2] Kernel (vanilla 6.2.0-rc5) logs attached, with: > 88SE6121-port0 is a SATA-2 ST3500418AS (works with u-boot, fails with linux kernel >3.16) > 88SE6121-port1 is a SATA-1 ST3250310NS (always works) > 88SE6121-port2 is (unused / not wired) PATA > (during my tests I tried other SATA-1/2/3 drives to rule out a problem with a specific drive or vendor) > > I've been trying to resurrect my NAS440 for over 10 years with all the components (https://github.com/hn/seagate-blackarmor-nas), so I have the hardware available and am happy to persevere to try things or otherwise help. > > Hajo > > > [1] U-Boot Log > > nas440> version > U-Boot 2022.04 (Apr 11 2022 - 15:58:53 +0200) > NAS 440 > nas440> pci enum > pcie0.0: Link up > nas440> scsi reset > > Reset SCSI > scanning bus for devices... > Target spinup took 0 ms. > Target spinup took 0 ms. > SATA link 2 timeout. > AHCI 0001.0000 32 slots 3 ports 3 Gbps 0x7 impl SATA mode > flags: 64bit ncq stag led pmp slum part > Device 0: (0:0) Vendor: ATA Prod.: ST3500418AS Rev: CC38 > Type: Hard Disk > Capacity: 476940.0 MB = 465.7 GB (976773168 x 512) > Device 1: (1:0) Vendor: ATA Prod.: ST3250310NS Rev: SN04 > Type: Hard Disk > Capacity: 238475.1 MB = 232.8 GB (488397168 x 512) > nas440> scsi part 0 > > Partition Map for SCSI device 0 -- Partition Type: DOS > > Part Start Sector Num Sectors UUID Type > 1 2048 209715200 cba79dc0-01 83 > 2 209717248 767055920 cba79dc0-02 eb > nas440> ext2ls scsi 0:1 > <DIR> 4096 . > <DIR> 4096 .. > <DIR> 16384 lost+found > 568888832 foo > > > [2] U-Boot Log > > root@nas440:~# uname -a > Linux nas440 6.2.0-rc5 #1 Tue Jan 24 23:41:07 CET 2023 armv5tel GNU/Linux > root@nas440:~# modprobe pci-mvebu > > [ 208.588347] mvebu-pcie mbus@f1000000:pcie@82000000: host bridge /mbus@f1000000/pcie@82000000 ranges: > [ 208.597651] mvebu-pcie mbus@f1000000:pcie@82000000: MEM 0x00f1040000..0x00f1041fff -> 0x0000040000 > [ 208.611351] mvebu-pcie mbus@f1000000:pcie@82000000: MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000 > [ 208.621380] mvebu-pcie mbus@f1000000:pcie@82000000: IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000 > [ 208.641381] mvebu-pcie mbus@f1000000:pcie@82000000: pcie0.0: legacy INTx interrupts cannot be masked individually, /mbus@f1000000/pcie@82000000/pcie@1,0 does not contain intx interrupt > [ 208.667286] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00 > [ 208.684189] pci_bus 0000:00: root bus resource [bus 00-ff] > [ 208.689802] pci_bus 0000:00: root bus resource [mem 0xf1040000-0xf1041fff] (bus address [0x00040000-0x00041fff]) > [ 208.705363] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff] > [ 208.712352] pci_bus 0000:00: root bus resource [io 0x1000-0xeffff] > [ 208.723392] pci 0000:00:01.0: [11ab:6281] type 01 class 0x060400 > [ 208.739782] PCI: bus0: Fast back to back transfers disabled > [ 208.745470] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring > [ 208.766397] pci 0000:01:00.0: [11ab:6121] type 00 class 0x01018f > [ 208.772921] pci 0000:01:00.0: reg 0x10: [io 0xc0000000-0xc0000007] > [ 208.779272] pci 0000:01:00.0: reg 0x14: [io 0xc0000008-0xc000000b] > [ 208.785607] pci 0000:01:00.0: reg 0x18: [io 0xc0000010-0xc0000017] > [ 208.791937] pci 0000:01:00.0: reg 0x1c: [io 0xc0000018-0xc000001b] > [ 208.798267] pci 0000:01:00.0: reg 0x20: [io 0xc0000020-0xc000002f] > [ 208.804598] pci 0000:01:00.0: reg 0x24: [mem 0x90000000-0x900003ff] > [ 208.818936] pci 0000:01:00.0: supports D1 > [ 208.823276] pci 0000:01:00.0: PME# supported from D0 D1 D3hot > [ 208.840601] PCI: bus1: Fast back to back transfers disabled > [ 208.846297] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01 > [ 208.879294] pci 0000:00:01.0: BAR 8: assigned [mem 0xe0000000-0xe00fffff] > [ 208.886183] pci 0000:00:01.0: BAR 7: assigned [io 0x10000-0x10fff] > [ 208.901547] pci 0000:01:00.0: BAR 5: assigned [mem 0xe0000000-0xe00003ff] > [ 208.908459] pci 0000:01:00.0: BAR 4: assigned [io 0x10000-0x1000f] > [ 208.914896] pci 0000:01:00.0: BAR 0: assigned [io 0x10010-0x10017] > [ 208.921238] pci 0000:01:00.0: BAR 2: assigned [io 0x10018-0x1001f] > [ 208.927576] pci 0000:01:00.0: BAR 1: assigned [io 0x10020-0x10023] > [ 208.933905] pci 0000:01:00.0: BAR 3: assigned [io 0x10024-0x10027] > [ 208.940240] pci 0000:00:01.0: PCI bridge to [bus 01] > [ 208.945257] pci 0000:00:01.0: bridge window [io 0x10000-0x10fff] > [ 208.951596] pci 0000:00:01.0: bridge window [mem 0xe0000000-0xe00fffff] > [ 208.992175] pcieport 0000:00:01.0: enabling device (0140 -> 0143) > [ 209.007014] ahci 0000:01:00.0: Disabling your PATA port. Use the boot option 'ahci.marvell_enable=0' to avoid this. See drivers/ata/ahci.c: /* The AHCI driver can only drive the SATA ports, the PATA driver can drive them all so if both drivers are selected make sure AHCI stays out of the way */ Can you try the pata driver instead: pata_marvell (CONFIG_PATA_MARVELL). > [ 209.017595] ahci 0000:01:00.0: controller can't do NCQ, turning off CAP_NCQ > [ 209.024616] ahci 0000:01:00.0: controller can't do PMP, turning off CAP_PMP > [ 209.031635] ahci 0000:01:00.0: masking port_map 0x7 -> 0x3 > [ 209.067304] ahci 0000:01:00.0: SSS flag set, parallel bus scan disabled > [ 209.074078] ahci 0000:01:00.0: AHCI 0001.0000 32 slots 3 ports 3 Gbps 0x3 impl IDE mode > [ 209.082187] ahci 0000:01:00.0: flags: 64bit stag led slum part > [ 209.107629] scsi host3: ahci > [ 209.117716] scsi host4: ahci > [ 209.131433] scsi host5: ahci > [ 209.134706] ata3: SATA max UDMA/133 abar m1024@0xe0000000 port 0xe0000100 irq 39 > [ 209.142214] ata4: SATA max UDMA/133 abar m1024@0xe0000000 port 0xe0000180 irq 39 > [ 209.149676] ata5: DUMMY > [ 209.469562] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300) > [ 214.631228] ata3.00: qc timeout after 5000 msecs (cmd 0xec) > [ 214.636919] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) > [ 214.957579] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300) > [ 225.127261] ata3.00: qc timeout after 10000 msecs (cmd 0xec) > [ 225.133030] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) > [ 225.139184] ata3: limiting SATA link speed to 1.5 Gbps > [ 225.457616] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 310) > [ 257.127404] ata3.00: qc timeout after 30000 msecs (cmd 0xec) > [ 257.133181] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) > [ 257.453758] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 310) > [ 257.773761] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300) > [ 257.781254] ata4.00: ATA-6: ST3250310NS, SN04, max UDMA/133 > [ 257.786916] ata4.00: 488397168 sectors, multi 0: LBA48 NCQ (depth 0/32) > [ 257.796826] ata4.00: configured for UDMA/133 > [ 257.801537] scsi 4:0:0:0: Direct-Access ATA ST3250310NS SN04 PQ: 0 ANSI: 5 Is this a SATA-1 drive (max 1.5gbps) ? port 3 does not work, but port 4 does... Can you try swapping the drives connected to see if you end up with ata3 working but not ata4 ? > [ 257.820228] sd 4:0:0:0: [sdd] 488397168 512-byte logical blocks: (250 GB/233 GiB) > [ 257.828149] sd 4:0:0:0: Attached scsi generic sg3 type 0 > [ 257.843562] sd 4:0:0:0: [sdd] Write Protect is off > [ 257.859628] sd 4:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA > [ 257.879625] sd 4:0:0:0: [sdd] Preferred minimum I/O size 512 bytes > [ 257.918058] sdd: sdd1 sdd2 > [ 257.920294] sd 4:0:0:0: [sdd] Attached SCSI disk > -- Damien Le Moal Western Digital Research ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Marvel 88SE6121 fails with SATA-2/3 HDDs 2023-01-26 0:34 ` Damien Le Moal @ 2023-01-26 15:41 ` Hajo Noerenberg 2023-01-30 13:40 ` Hajo Noerenberg 0 siblings, 1 reply; 7+ messages in thread From: Hajo Noerenberg @ 2023-01-26 15:41 UTC (permalink / raw) To: Damien Le Moal, linux-ide; +Cc: Pali Rohár Am 26.01.2023 um 01:34 schrieb Damien Le Moal: > On 2023/01/25 22:23, Hajo Noerenberg wrote: >> >> Bug report for Seagate Blackarmor NAS440 with Marvel 88SE6121 controller (AHCI kernel module): Very old SATA-1 HDDs (mostly laptop HDDs in my tests) work flawlessly, SATA-2/3 consistently fail. Limiting SATA speed (libata.force=1.5G ...) does not help. >> >> [ 208.992175] pcieport 0000:00:01.0: enabling device (0140 -> 0143) >> [ 209.007014] ahci 0000:01:00.0: Disabling your PATA port. Use the boot option 'ahci.marvell_enable=0' to avoid this. > > See drivers/ata/ahci.c: > > /* The AHCI driver can only drive the SATA ports, the PATA driver > can drive them all so if both drivers are selected make sure > AHCI stays out of the way */ > > Can you try the pata driver instead: pata_marvell (CONFIG_PATA_MARVELL). > linux-6.2-rc5# rmmod ahci linux-6.2-rc5# insmod ./drivers/ata/pata_marvell.ko [71690.890645] scsi host3: pata_marvell [71690.901410] scsi host4: pata_marvell [71690.906035] ata9: PATA max UDMA/100 cmd 0x10010 ctl 0x10020 bmdma 0x10000 irq 39 [71690.913584] ata10: PATA max UDMA/133 cmd 0x10018 ctl 0x10024 bmdma 0x10008 irq 39 linux-6.2-rc5# lspci -vv 01:00.0 IDE interface: Marvell Technology Group Ltd. 88SE6111/6121 SATA II / PATA Controller (rev b2) (prog-if 8f [PCI native mode controller, supports both channels switched to ISA compatibility mode, supports bus mastering]) Subsystem: Marvell Technology Group Ltd. 88SE6111/6121 1/2 port SATA II + 1 port PATA Controller [...] Kernel driver in use: pata_marvell Kernel modules: ahci But no disks show up. I'm pretty sure I tried the pata_marvell driver with some older kernels last year and had no positive results, but I do not remember in detail. >> [ 209.017595] ahci 0000:01:00.0: controller can't do NCQ, turning off CAP_NCQ >> [ 209.024616] ahci 0000:01:00.0: controller can't do PMP, turning off CAP_PMP >> [ 209.031635] ahci 0000:01:00.0: masking port_map 0x7 -> 0x3 >> [ 209.067304] ahci 0000:01:00.0: SSS flag set, parallel bus scan disabled >> [ 209.074078] ahci 0000:01:00.0: AHCI 0001.0000 32 slots 3 ports 3 Gbps 0x3 impl IDE mode >> [ 209.082187] ahci 0000:01:00.0: flags: 64bit stag led slum part >> [ 209.107629] scsi host3: ahci >> [ 209.117716] scsi host4: ahci >> [ 209.131433] scsi host5: ahci >> [ 209.134706] ata3: SATA max UDMA/133 abar m1024@0xe0000000 port 0xe0000100 irq 39 >> [ 209.142214] ata4: SATA max UDMA/133 abar m1024@0xe0000000 port 0xe0000180 irq 39 >> [ 209.149676] ata5: DUMMY >> [ 209.469562] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300) >> [ 214.631228] ata3.00: qc timeout after 5000 msecs (cmd 0xec) >> [ 214.636919] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) >> [ 214.957579] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300) >> [ 225.127261] ata3.00: qc timeout after 10000 msecs (cmd 0xec) >> [ 225.133030] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) >> [ 225.139184] ata3: limiting SATA link speed to 1.5 Gbps >> [ 225.457616] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 310) >> [ 257.127404] ata3.00: qc timeout after 30000 msecs (cmd 0xec) >> [ 257.133181] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) >> [ 257.453758] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 310) >> [ 257.773761] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300) >> [ 257.781254] ata4.00: ATA-6: ST3250310NS, SN04, max UDMA/133 >> [ 257.786916] ata4.00: 488397168 sectors, multi 0: LBA48 NCQ (depth 0/32) >> [ 257.796826] ata4.00: configured for UDMA/133 >> [ 257.801537] scsi 4:0:0:0: Direct-Access ATA ST3250310NS SN04 PQ: 0 ANSI: 5 > > Is this a SATA-1 drive (max 1.5gbps) ? port 3 does not work, but port 4 does... > Can you try swapping the drives connected to see if you end up with ata3 working > but not ata4 ? > Swapping the drives slots does not change anything. ST3250310NS works, ST3500418AS not. For my ST3250310NS, "hdparm -I" shows "Gen1 signaling speed (1.5Gb/s)" only. That's why I call it a SATA-1 drive. Oddly enough, a web search shows that it is sold as Sata-2 (https://www.seagate.com/docs/pdf/datasheet/disc/ds_barracuda_es.pdf). I double checked with a FUJITSU MHZ2160BH laptop drive (hdparm shows Gen1=1.5Gb/s only), this works without problems. Other Gen2/Gen3 drives e.g. a WD3202ABYS or WD30EFRX do not work ("failed to IDENTIFY"). I may need to summarize my observations more precisely: drives that advertise a speed higher than Gen1=1.5Gb/s ("hdparm -I") do not work with the 88SE6121 controller and Linux kernel ahci module. Limiting SATA speed (libata.force=1.5G ...) does not help. I can't completely rule out that the problem is definitely something to do with the SATA speed. These are just the observations with the drives available to me. Hajo ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Marvel 88SE6121 fails with SATA-2/3 HDDs 2023-01-26 15:41 ` Hajo Noerenberg @ 2023-01-30 13:40 ` Hajo Noerenberg 2023-01-31 2:34 ` Damien Le Moal 0 siblings, 1 reply; 7+ messages in thread From: Hajo Noerenberg @ 2023-01-30 13:40 UTC (permalink / raw) To: linux-ide; +Cc: Pali Rohár, Damien Le Moal, risc4all Am 26.01.2023 um 16:41 schrieb Hajo Noerenberg: >>> [ 209.134706] ata3: SATA max UDMA/133 abar m1024@0xe0000000 port 0xe0000100 irq 39 >>> [ 209.142214] ata4: SATA max UDMA/133 abar m1024@0xe0000000 port 0xe0000180 irq 39 >>> [ 209.149676] ata5: DUMMY >>> [ 209.469562] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300) >>> [ 214.631228] ata3.00: qc timeout after 5000 msecs (cmd 0xec) >>> [ 214.636919] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) >>> [ 214.957579] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300) >>> [ 225.127261] ata3.00: qc timeout after 10000 msecs (cmd 0xec) >>> [ 225.133030] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) >>> [ 225.139184] ata3: limiting SATA link speed to 1.5 Gbps >>> [ 225.457616] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 310) >>> [ 257.127404] ata3.00: qc timeout after 30000 msecs (cmd 0xec) >>> [ 257.133181] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) >>> [ 257.453758] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 310) >>> [ 257.773761] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300) >>> [ 257.781254] ata4.00: ATA-6: ST3250310NS, SN04, max UDMA/133 >>> [ 257.786916] ata4.00: 488397168 sectors, multi 0: LBA48 NCQ (depth 0/32) >>> [ 257.796826] ata4.00: configured for UDMA/133 >>> [ 257.801537] scsi 4:0:0:0: Direct-Access ATA ST3250310NS SN04 PQ: 0 ANSI: 5 >> >> Is this a SATA-1 drive (max 1.5gbps) ? port 3 does not work, but port 4 does... >> Can you try swapping the drives connected to see if you end up with ata3 working >> but not ata4 ? >> > > Swapping the drives slots does not change anything. ST3250310NS works, ST3500418AS not. > > For my ST3250310NS, "hdparm -I" shows "Gen1 signaling speed (1.5Gb/s)" only. That's why I call it a SATA-1 drive. Oddly enough, a web search shows that it is sold as Sata-2 (https://www.seagate.com/docs/pdf/datasheet/disc/ds_barracuda_es.pdf). > Update on this: For whatever reason, the ST3250310NS had a "downgrade to 1.5GB/s" jumper set on the back of the drive. I had stupidly forgotten that HDD drives have jumpers (the last time I set a jumper on a hard drive was on old PATA drives decades ago). Thankfully someone added a hint to the bugzilla bug report (216094, comment #48). If I remove the 1.5GB/s jumper, the ST3250310NS fails as well within Linux kernel. With U-Boot it works without jumper: Reset SCSI scanning bus for devices... SATA link 0 timeout. Target spinup took 0 ms. SATA link 2 timeout. AHCI 0001.0000 32 slots 3 ports 3 Gbps 0x7 impl SATA mode flags: 64bit ncq stag led pmp slum part Device 0: (1:0) Vendor: ATA Prod.: ST3250310NS Rev: SN04 Type: Hard Disk Capacity: 238475.1 MB = 232.8 GB (488397168 x 512) > I double checked with a FUJITSU MHZ2160BH laptop drive (hdparm shows Gen1=1.5Gb/s only), this works without problems. Other Gen2/Gen3 drives e.g. a WD3202ABYS or WD30EFRX do not work ("failed to IDENTIFY"). > I tried to jumper the WD30EFRX to 1.5GB/s but this does not change anything (still fails). But I'm unsure that the "downgrade jumper" even works at all for this relativly new drive. But with U-Boot it works: Reset SCSI scanning bus for devices... Target spinup took 0 ms. Target spinup took 0 ms. SATA link 2 timeout. AHCI 0001.0000 32 slots 3 ports 3 Gbps 0x7 impl SATA mode flags: 64bit ncq stag led pmp slum part Device 0: (0:0) Vendor: ATA Prod.: WDC WD30EFRX-68E Rev: 80.0 Type: Hard Disk I tested with another drive, a WD5000AADS: with 1.5Gb/s-jumper it works within Linux, without not. With U-Boot it works regardless of jumper setting. I double-checked with libata.force=1.5GGbps, but this does not help: [ 49.191878] ata3: FORCE: PHY spd limit set to 1.5Gbps [ 49.197028] ata3: SATA max UDMA/133 abar m1024@0xe0000000 port 0xe0000100 irq 39 [ 49.204511] ata4: FORCE: PHY spd limit set to 1.5Gbps [ 49.209606] ata4: SATA max UDMA/133 abar m1024@0xe0000000 port 0xe0000180 irq 39 [ 49.217062] ata5: DUMMY [ 49.532303] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 310) [ 54.753947] ata3.00: qc timeout after 5000 msecs (cmd 0xec) [ 54.759637] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) [ 55.080266] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 310) [ 65.249946] ata3.00: qc timeout after 10000 msecs (cmd 0xec) Summary: With U-Boot and kernels <3.16 the drives work, even without jumper. I wonder if there is a way to get the drives working with up to date kernels. This would have the benefit of a.) no need to set jumpers and b.) getting bigger/newer drives like the WD30EFRX to work which probably do not have a downgrade-jumper. Hajo ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Marvel 88SE6121 fails with SATA-2/3 HDDs 2023-01-30 13:40 ` Hajo Noerenberg @ 2023-01-31 2:34 ` Damien Le Moal 2023-02-01 10:02 ` Hajo Noerenberg 0 siblings, 1 reply; 7+ messages in thread From: Damien Le Moal @ 2023-01-31 2:34 UTC (permalink / raw) To: Hajo Noerenberg, linux-ide; +Cc: Pali Rohár, risc4all On 1/30/23 22:40, Hajo Noerenberg wrote > Summary: With U-Boot and kernels <3.16 the drives work, even without jumper. > I wonder if there is a way to get the drives working with up to date kernels. > This would have the benefit of a.) no need to set jumpers and b.) getting > bigger/newer drives like the WD30EFRX to work which probably do not have a > downgrade-jumper. Can you try with libata.force=nolpm ? A lot of old WD drives have broken LPM. Also, did you try with the pata_marvell driver instead of AHCI driver ? -- Damien Le Moal Western Digital Research ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Marvel 88SE6121 fails with SATA-2/3 HDDs 2023-01-31 2:34 ` Damien Le Moal @ 2023-02-01 10:02 ` Hajo Noerenberg 2023-02-13 1:28 ` Damien Le Moal 0 siblings, 1 reply; 7+ messages in thread From: Hajo Noerenberg @ 2023-02-01 10:02 UTC (permalink / raw) To: Damien Le Moal, linux-ide; +Cc: Pali Rohár, risc4all Am 31.01.2023 um 03:34 schrieb Damien Le Moal: > On 1/30/23 22:40, Hajo Noerenberg wrote >> Summary: With U-Boot and kernels <3.16 the drives work, even without jumper. >> I wonder if there is a way to get the drives working with up to date kernels. >> This would have the benefit of a.) no need to set jumpers and b.) getting >> bigger/newer drives like the WD30EFRX to work which probably do not have a >> downgrade-jumper. > I forgot to mention the main benefit: Without the "downgrade-jumper" the drives are able to run at SATA-2 speed (the 88SE6121 is a SATA-2 controller). At least with kernel 2.6.x (ahci module) one can see the ST3500418AS running at 3Gbps: [ 151.957573] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 151.958713] ata1.00: ATA-8: ST3500418AS, CC38, max UDMA/133 [ 151.958726] ata1.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 0/32) [ 151.960062] ata1.00: configured for UDMA/133 [ 151.960397] scsi 0:0:0:0: Direct-Access ATA ST3500418AS CC38 PQ: 0 ANSI: 5 And with kernel 2.6.x even the SATA-3 WD30EFRX runs at 3Gbps as well (no jumper, no kernel option) and has full 3TB accessible: [ 100.497589] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 100.498145] ata1.00: HPA detected: current 5860531055, native 5860533168 [ 100.498165] ata1.00: ATA-9: WDC WD30EFRX-68EUZN0, 80.00A80, max UDMA/133 [ 100.498177] ata1.00: 5860531055 sectors, multi 0: LBA48 NCQ (depth 0/32) [ 100.498853] ata1.00: configured for UDMA/133 [ 100.499187] scsi 0:0:0:0: Direct-Access ATA WDC WD30EFRX-68E 80.0 PQ: 0 ANSI: 5 > Can you try with libata.force=nolpm ? A lot of old WD drives have broken LPM. > libata.force=nolpm slightly changes the kernel log: the drive is basically detected (the model name and drive geometry show up), but in the end it fails: [ 64.796687] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 69.857963] ata3.00: qc timeout after 5000 msecs (cmd 0xec) [ 69.863648] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) [ 70.184453] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 70.191202] ata3.00: FORCE: horkage modified (nolpm) [ 70.196248] ata3.00: LPM support broken, forcing max_power [ 70.204387] ata3.00: HPA detected: current 5860531055, native 5860533168 [ 70.211203] ata3.00: ATA-9: WDC WD30EFRX-68EUZN0, 80.00A80, max UDMA/133 [ 70.218000] ata3.00: 5860531055 sectors, multi 0: LBA48 NCQ (depth 0/32) [ 80.354002] ata3.00: qc timeout after 10000 msecs (cmd 0xec) [ 80.359772] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) [ 80.365924] ata3.00: revalidation failed (errno=-5) [ 80.370851] ata3: limiting SATA link speed to 1.5 Gbps [ 80.376037] ata3.00: limiting speed to UDMA/133:PIO3 [ 80.696310] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 310) [ 111.586110] ata3.00: qc timeout after 30000 msecs (cmd 0xec) [ 111.591884] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) [ 111.598028] ata3.00: revalidation failed (errno=-5) [ 111.602961] ata3.00: disable device Without libata.force=nolpm the model name does not show up, only "failed to IDENTIFY": [ 121.877545] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 127.063106] ata3.00: qc timeout after 5000 msecs (cmd 0xec) [ 127.068801] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) [ 127.389453] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [ 137.558996] ata3.00: qc timeout after 10000 msecs (cmd 0xec) [ 137.564772] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) [ 137.570930] ata3: limiting SATA link speed to 1.5 Gbps [ 137.889346] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 310) I also checked with another drive, a WD5000AADS. With this drive the "nolpm" flag does not change the kernel log at all. > Also, did you try with the pata_marvell driver instead of AHCI driver ? > Yes, but no disks show up. Please see https://marc.info/?l=linux-ide&m=167474771722812&w=2 Hajo ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Marvel 88SE6121 fails with SATA-2/3 HDDs 2023-02-01 10:02 ` Hajo Noerenberg @ 2023-02-13 1:28 ` Damien Le Moal 0 siblings, 0 replies; 7+ messages in thread From: Damien Le Moal @ 2023-02-13 1:28 UTC (permalink / raw) To: Hajo Noerenberg, linux-ide; +Cc: Pali Rohár, risc4all On 2/1/23 19:02, Hajo Noerenberg wrote: > Am 31.01.2023 um 03:34 schrieb Damien Le Moal: >> On 1/30/23 22:40, Hajo Noerenberg wrote >>> Summary: With U-Boot and kernels <3.16 the drives work, even without jumper. >>> I wonder if there is a way to get the drives working with up to date kernels. >>> This would have the benefit of a.) no need to set jumpers and b.) getting >>> bigger/newer drives like the WD30EFRX to work which probably do not have a >>> downgrade-jumper. >> > > I forgot to mention the main benefit: Without the "downgrade-jumper" the drives are able to run at SATA-2 speed (the 88SE6121 is a SATA-2 controller). At least with kernel 2.6.x (ahci module) one can see the ST3500418AS running at 3Gbps: > > [ 151.957573] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) > [ 151.958713] ata1.00: ATA-8: ST3500418AS, CC38, max UDMA/133 > [ 151.958726] ata1.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 0/32) > [ 151.960062] ata1.00: configured for UDMA/133 > [ 151.960397] scsi 0:0:0:0: Direct-Access ATA ST3500418AS CC38 PQ: 0 ANSI: 5 > > And with kernel 2.6.x even the SATA-3 WD30EFRX runs at 3Gbps as well (no jumper, no kernel option) and has full 3TB accessible: > > [ 100.497589] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) > [ 100.498145] ata1.00: HPA detected: current 5860531055, native 5860533168 > [ 100.498165] ata1.00: ATA-9: WDC WD30EFRX-68EUZN0, 80.00A80, max UDMA/133 > [ 100.498177] ata1.00: 5860531055 sectors, multi 0: LBA48 NCQ (depth 0/32) > [ 100.498853] ata1.00: configured for UDMA/133 > [ 100.499187] scsi 0:0:0:0: Direct-Access ATA WDC WD30EFRX-68E 80.0 PQ: 0 ANSI: 5 > > > >> Can you try with libata.force=nolpm ? A lot of old WD drives have broken LPM. >> > > libata.force=nolpm slightly changes the kernel log: the drive is basically detected (the model name and drive geometry show up), but in the end it fails: > > [ 64.796687] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300) The max 3gbps speed of the adapter is being detected/negotiated as can be seen here. > [ 69.857963] ata3.00: qc timeout after 5000 msecs (cmd 0xec) > [ 69.863648] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) > [ 70.184453] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300) > [ 70.191202] ata3.00: FORCE: horkage modified (nolpm) > [ 70.196248] ata3.00: LPM support broken, forcing max_power > [ 70.204387] ata3.00: HPA detected: current 5860531055, native 5860533168 > [ 70.211203] ata3.00: ATA-9: WDC WD30EFRX-68EUZN0, 80.00A80, max UDMA/133 So this means that after forcing max power (nolpm), IDENTIFY works. > [ 70.218000] ata3.00: 5860531055 sectors, multi 0: LBA48 NCQ (depth 0/32) > [ 80.354002] ata3.00: qc timeout after 10000 msecs (cmd 0xec) > [ 80.359772] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) > [ 80.365924] ata3.00: revalidation failed (errno=-5) But then fails again here on a timeout, so the drive seems to be stuck again... Given that this drive has HPA, can you try this patch: diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 36c1aca310e9..27ccb765e464 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3985,6 +3985,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { { "HDS724040KLSA80", "KFAOA20N", ATA_HORKAGE_BROKEN_HPA }, { "WDC WD3200JD-00KLB0", "WD-WCAMR1130137", ATA_HORKAGE_BROKEN_HPA }, { "WDC WD2500JD-00HBB0", "WD-WMAL71490727", ATA_HORKAGE_BROKEN_HPA }, + { "WDC WD30EFRX-68EUZN0", NULL, ATA_HORKAGE_BROKEN_HPA | ATA_HORKAGE_NOLPM}, { "MAXTOR 6L080L4", "A93.0500", ATA_HORKAGE_BROKEN_HPA }, /* this one allows HPA unlocking but fails IOs on the area */ Just to check if it is another drive with a broken HPA. You can also try with libata.ignore_hpa=0 together with nolpm option. > [ 80.370851] ata3: limiting SATA link speed to 1.5 Gbps > [ 80.376037] ata3.00: limiting speed to UDMA/133:PIO3 > [ 80.696310] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 310) > [ 111.586110] ata3.00: qc timeout after 30000 msecs (cmd 0xec) > [ 111.591884] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) > [ 111.598028] ata3.00: revalidation failed (errno=-5) > [ 111.602961] ata3.00: disable device > > Without libata.force=nolpm the model name does not show up, only "failed to IDENTIFY": > > [ 121.877545] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300) > [ 127.063106] ata3.00: qc timeout after 5000 msecs (cmd 0xec) > [ 127.068801] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) > [ 127.389453] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300) > [ 137.558996] ata3.00: qc timeout after 10000 msecs (cmd 0xec) > [ 137.564772] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x4) > [ 137.570930] ata3: limiting SATA link speed to 1.5 Gbps > [ 137.889346] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 310) > > > I also checked with another drive, a WD5000AADS. With this drive the "nolpm" flag does not change the kernel log at all. > >> Also, did you try with the pata_marvell driver instead of AHCI driver ? >> > > Yes, but no disks show up. Please see https://marc.info/?l=linux-ide&m=167474771722812&w=2 > > Hajo > > -- Damien Le Moal Western Digital Research ^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-02-13 1:28 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-01-25 13:23 Marvel 88SE6121 fails with SATA-2/3 HDDs Hajo Noerenberg 2023-01-26 0:34 ` Damien Le Moal 2023-01-26 15:41 ` Hajo Noerenberg 2023-01-30 13:40 ` Hajo Noerenberg 2023-01-31 2:34 ` Damien Le Moal 2023-02-01 10:02 ` Hajo Noerenberg 2023-02-13 1:28 ` Damien Le Moal
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.