geerlingguy / raspberry-pi-pcie-devices

Raspberry Pi PCI Express device compatibility database
http://pipci.jeffgeerling.com
GNU General Public License v3.0
1.63k stars 145 forks source link

ASMedia Technology Inc. Device 1064 M.2 NVME to Mini SAS Expansion Card Support 4 Ports SATA3.0 6Gbps HDD SSD SATA Controller SFF8087 #600

Closed ezaul closed 9 months ago

ezaul commented 10 months ago

I bought it at the end of the year on Aliexpress to test with my Raspberry pi 5 + HatDrive! Bottom

SATA controller: ASMedia Technology Inc. Device 1064 (rev 02) (prog-if 01 [AHCI 1.0]) image https://es.aliexpress.com/item/1005006050617325.html?spm=a2g0o.order_list.order_list_main.5.4f40194dhsM2q1&gatewayAdapt=glo2esp

HatDrive! Bottom image https://pineberrypi.com/products/hatdrive-bottom-2230-2242-2280-for-rpi5?pr_prod_strat=jac&pr_rec_id=aa41a0aa3&pr_rec_pid=8729962250573&pr_ref_pid=8729958023501&pr_seq=uniform

lspci -k

0000:01:00.0 SATA controller: ASMedia Technology Inc. Device 1064 (rev 02)
        Subsystem: ASMedia Technology Inc. Device 2116
        Kernel driver in use: ahci
        Kernel modules: ahci

lspci -v

0000:01:00.0 SATA controller: ASMedia Technology Inc. Device 1064 (rev 02) (prog-if 01 [AHCI 1.0])
        Subsystem: ASMedia Technology Inc. Device 2116
        Flags: bus master, fast devsel, latency 0, IRQ 170
        Memory at 1b00080000 (32-bit, non-prefetchable) [size=8K]
        Memory at 1b00082000 (32-bit, non-prefetchable) [size=8K]
        Expansion ROM at 1b00000000 [virtual] [disabled] [size=512K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [80] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [130] Secondary PCI Express
        Capabilities: [170] Latency Tolerance Reporting
        Capabilities: [200] L1 PM Substates
        Kernel driver in use: ahci
        Kernel modules: ahci

lspci -vvv

0000:01:00.0 SATA controller: ASMedia Technology Inc. Device 1064 (rev 02) (prog-if 01 [AHCI 1.0])
        Subsystem: ASMedia Technology Inc. Device 2116
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 170
        Region 0: Memory at 1b00080000 (32-bit, non-prefetchable) [size=8K]
        Region 5: Memory at 1b00082000 (32-bit, non-prefetchable) [size=8K]
        Expansion ROM at 1b00000000 [virtual] [disabled] [size=512K]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 000000ffffffe000  Data: 0008
        Capabilities: [80] Express (v2) Endpoint, MSI 00
                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 0W
                DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+
                        RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 256 bytes, MaxReadReq 256 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 8GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 <64us
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes, Disabled- CommClk+
                        ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 8GT/s, Width x1
                        TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Not Supported, TimeoutDis- NROPrPrP- LTR+
                         10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS- TPHComp- ExtTPHComp-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR+ 10BitTagReq- OBFF Disabled,
                         AtomicOpsCtl: ReqEn-
                LnkCap2: Supported Link Speeds: 2.5-8GT/s, Crosslink- Retimer- 2Retimers- DRS-
                LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis+
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance Preset/De-emphasis: -6dB de-emphasis, 0dB preshoot
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete+ EqualizationPhase1+
                         EqualizationPhase2+ EqualizationPhase3+ LinkEqualizationRequest-
                         Retimer- 2Retimers- CrosslinkRes: unsupported
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
                        MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                HeaderLog: 00000000 00000000 00000000 00000000
        Capabilities: [130 v1] Secondary PCI Express
                LnkCtl3: LnkEquIntrruptEn- PerformEqu-
                LaneErrStat: 0
        Capabilities: [170 v1] Latency Tolerance Reporting
                Max snoop latency: 0ns
                Max no snoop latency: 0ns
        Capabilities: [200 v1] L1 PM Substates
                L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
                          PortCommonModeRestoreTime=128us PortTPowerOnTime=10us
                L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
                           T_CommonMode=0us LTR1.2_Threshold=144384ns
                L1SubCtl2: T_PwrOn=10us
        Kernel driver in use: ahci
        Kernel modules: ahci

hwinfo --pci

02: PCI 100.0: 0106 SATA controller (AHCI 1.0)
  [Created at pci.386]
  Unique ID: VCu0.99sqHVWl1HB
  Parent ID: qLht.sFJvPhlHmw3
  SysFS ID: /devices/platform/axi/1000110000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0
  SysFS BusID: 0000:01:00.0
  Hardware Class: storage
  Model: "ASMedia SATA controller"
  Vendor: pci 0x1b21 "ASMedia Technology Inc."
  Device: pci 0x1064
  SubVendor: pci 0x1b21 "ASMedia Technology Inc."
  SubDevice: pci 0x2116
  Revision: 0x02
  Driver: "ahci"
  Driver Modules: "ahci"
  Memory Range: 0x1b00080000-0x1b00081fff (rw,non-prefetchable)
  Memory Range: 0x1b00082000-0x1b00083fff (rw,non-prefetchable)
  Memory Range: 0x1b00000000-0x1b0007ffff (ro,non-prefetchable,disabled)
  IRQ: 168 (no events)
  Module Alias: "pci:v00001B21d00001064sv00001B21sd00002116bc01sc06i01"
  Driver Info #0:
    Driver Status: ahci is active
    Driver Activation Cmd: "modprobe ahci"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #3 (PCI bridge)

When I turn it on without HD or SSD in "dmesg" it returns the following:

[ 3.142703] ahci 0000:01:00.0: version 3.0
[ 3.142734] ahci 0000:01:00.0: enabling device (0000 -> 0002)
[ 3.149425] ahci 0000:01:00.0: SSS flag set, parallel bus scan disabled
[ 3.156374] ahci 0000:01:00.0: AHCI 0001.0301 32 slots 24 ports 6 Gbps 0xffff0f impl SATA mode
[ 3.165382] ahci 0000:01:00.0: flags: 64bit ncq sntf stag pm led only pio slum part deso sadm sds apst
[ 3.183964] input: pwr_button as /devices/platform/pwr_button/input/input0
[ 3.193013] brcmstb-i2c 107d508200.i2c: @200000hz registered in interrupt mode
[ 3.223168] brcmstb-i2c 107d508280.i2c: @200000hz registered in interrupt mode
[ 3.257160] scsi host0: ahci
[ 3.260290] scsi host1: ahci
[ 3.263512] scsi host2: ahci
[ 3.266538] scsi host3: ahci
[ 3.269531] scsi host4: ahci
[ 3.272582] scsi host5: ahci
[ 3.275578] scsi host6: ahci
[ 3.278584] scsi host7: ahci
[ 3.281571] scsi host8: ahci
[ 3.284586] scsi host9: ahci
[ 3.287581] scsi host10: ahci
[ 3.290680] scsi host11: ahci
[ 3.293764] scsi host12: ahci
[ 3.296857] scsi host13: ahci
[ 3.299949] scsi host14: ahci
[ 3.303037] scsi host15: ahci
[ 3.306118] scsi host16: ahci
[ 3.309224] scsi host17: ahci
[ 3.312300] scsi host18: ahci
[ 3.315401] scsi host19: ahci
[ 3.318482] scsi host20: ahci
[ 3.321575] scsi host21: ahci
[ 3.324663] scsi host22: ahci
[ 3.327768] scsi host23: ahci
[ 3.330811] ata1: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082100 irq 165
[ 3.338696] ata2: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082180 irq 165
[ 3.346577] ata3: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082200 irq 165
[ 3.354464] ata4: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082280 irq 165
[ 3.362327] ata5: DUMMY
[ 3.364774] ata6: DUMMY
[ 3.367224] ata7: DUMMY
[ 3.369671] ata8: DUMMY
[ 3.372136] ata9: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082500 irq 165
[ 3.380014] ata10: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082580 irq 165
[ 3.387979] ata11: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082600 irq 165
[ 3.395945] ata12: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082680 irq 165
[ 3.403911] ata13: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082700 irq 165
[ 3.411876] ata14: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082780 irq 165
[ 3.419854] ata15: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082800 irq 165
[ 3.427820] ata16: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082880 irq 165
[ 3.435787] ata17: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082900 irq 165
[ 3.443755] ata18: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082980 irq 165
[ 3.451721] ata19: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082a00 irq 165
[ 3.459686] ata20: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082a80 irq 165
[ 3.467651] ata21: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082b00 irq 165
[ 3.475617] ata22: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082b80 irq 165
[ 3.483582] ata23: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082c00 irq 165
[ 3.491548] ata24: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082c80 irq 165
[ 6.810294] ata1: found unknown device (class 0)
[ 6.814958] ata1: SATA link down (SStatus 0 SControl 300)
[ 7.132737] ata2: SATA link down (SStatus 0 SControl 300)
[ 7.460739] ata3: SATA link down (SStatus 0 SControl 300)
[ 7.780735] ata4: SATA link down (SStatus 0 SControl 300)
[ 8.100737] ata9: SATA link down (SStatus 0 SControl 300)
[ 8.420738] ata10: SATA link down (SStatus 0 SControl 300)
[ 8.740738] ata11: SATA link down (SStatus 0 SControl 300)
[ 9.068737] ata12: SATA link down (SStatus 0 SControl 300)
[ 9.388738] ata13: SATA link down (SStatus 0 SControl 300)
[ 9.716736] ata14: SATA link down (SStatus 0 SControl 300)
[ 10.036739] ata15: SATA link down (SStatus 0 SControl 300)
[ 10.356740] ata16: SATA link down (SStatus 0 SControl 300)
[ 10.677790] ata17: SATA link down (SStatus 0 SControl 300)
[ 11.008738] ata18: SATA link down (SStatus 0 SControl 300)
[ 11.328736] ata19: SATA link down (SStatus 0 SControl 300)
[ 11.648737] ata20: SATA link down (SStatus 0 SControl 300)
[ 11.976738] ata21: SATA link down (SStatus 0 SControl 300)
[ 12.304739] ata22: SATA link down (SStatus 0 SControl 300)
[ 12.624741] ata23: SATA link down (SStatus 0 SControl 300)
[ 12.944738] ata24: SATA link down (SStatus 0 SControl 300)
[ 13.074283] raid6: neonx8 gen() 7798 MB/s
[ 13.146295] raid6: neonx4 gen() 6546 MB/s
[ 13.218300] raid6: neonx2 gen() 5044 MB/s
[ 13.290282] raid6: neonx1 gen() 4582 MB/s
[ 13.362296] raid6: int64x8 gen() 3232 MB/s
[ 13.434299] raid6: int64x4 gen() 3054 MB/s
[ 13.506298] raid6: int64x2 gen() 2395 MB/s
[ 13.578279] raid6: int64x1 gen() 2283 MB/s
[ 13.582561] raid6: using algorithm neonx8 gen() 7798 MB/s
[ 13.654277] raid6: .... xor() 5297 MB/s, rmw enabled
[ 13.659259] raid6: using neon recovery algorithm
[ 13.664408] xor: measuring software checksum speed
[ 13.670214] 8regs : 9943 MB/sec
[ 13.675584] 32regs : 9836 MB/sec
[ 13.680688] arm64_neon : 13448 MB/sec
[ 13.685057] xor: using function: arm64_neon (13448 MB/sec)

Now when I plug in an HD or SSD and reboot "dmesg" returns this

[ 57.005280] ata23: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[ 57.005282] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 57.019089] pcieport 0000:00:00.0: AER: device recovery failed
[ 57.024944] pcieport 0000:00:00.0: AER: Multiple Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 57.262494] ahci 0000:01:00.0: AHCI controller unavailable!
[ 57.262500] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 57.279267] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 57.287653] pcieport 0000:00:00.0: [14] CmpltTO
[ 57.293769] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 57.300583] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 57.319547] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 57.319550] ahci 0000:01:00.0: AHCI controller unavailable!
[ 57.332394] pcieport 0000:00:00.0: AER: device recovery failed
[ 57.338249] pcieport 0000:00:00.0: AER: Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 57.679654] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 57.690836] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 57.699223] pcieport 0000:00:00.0: [14] CmpltTO
[ 57.705339] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 57.712154] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 57.732151] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 57.739408] pcieport 0000:00:00.0: AER: device recovery failed
[ 57.745262] pcieport 0000:00:00.0: AER: Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 57.753738] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 57.764918] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 57.773304] pcieport 0000:00:00.0: [14] CmpltTO
[ 57.779420] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 57.786235] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 57.794447] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 57.801704] pcieport 0000:00:00.0: AER: device recovery failed
[ 57.807560] pcieport 0000:00:00.0: AER: Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 57.816036] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 57.827216] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 57.835603] pcieport 0000:00:00.0: [14] CmpltTO
[ 57.841720] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 57.848534] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 57.930804] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 57.938062] pcieport 0000:00:00.0: AER: device recovery failed
[ 57.943917] pcieport 0000:00:00.0: AER: Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 57.989739] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 58.000919] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 58.009305] pcieport 0000:00:00.0: [14] CmpltTO
[ 58.015421] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 58.022235] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 58.030448] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 58.037704] pcieport 0000:00:00.0: AER: device recovery failed
[ 58.043558] pcieport 0000:00:00.0: AER: Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 58.052033] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 58.063214] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 58.071601] pcieport 0000:00:00.0: [14] CmpltTO
[ 58.077717] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 58.084531] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 58.092744] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 58.100000] pcieport 0000:00:00.0: AER: device recovery failed
[ 58.105854] pcieport 0000:00:00.0: AER: Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 58.114330] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 58.125509] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 58.133895] pcieport 0000:00:00.0: [14] CmpltTO
[ 58.140011] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 58.146825] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 58.155038] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 58.162295] pcieport 0000:00:00.0: AER: device recovery failed
[ 58.168149] pcieport 0000:00:00.0: AER: Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 58.176624] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 58.187805] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 58.196191] pcieport 0000:00:00.0: [14] CmpltTO
[ 58.202308] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 58.209122] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 58.245739] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 58.252996] pcieport 0000:00:00.0: AER: device recovery failed
[ 58.258850] pcieport 0000:00:00.0: AER: Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 58.267326] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 58.278505] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 58.286892] pcieport 0000:00:00.0: [14] CmpltTO
[ 58.293008] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 58.299822] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 58.308035] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 58.315292] pcieport 0000:00:00.0: AER: device recovery failed
[ 58.321146] pcieport 0000:00:00.0: AER: Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 58.329622] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 58.340801] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 58.349187] pcieport 0000:00:00.0: [14] CmpltTO
[ 58.355303] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 58.362117] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 58.370330] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 58.377586] pcieport 0000:00:00.0: AER: device recovery failed
[ 58.383440] pcieport 0000:00:00.0: AER: Multiple Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 58.392704] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 58.403883] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 58.412269] pcieport 0000:00:00.0: [14] CmpltTO
[ 58.418386] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 58.425200] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 58.433412] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 58.440669] pcieport 0000:00:00.0: AER: device recovery failed
[ 58.446524] pcieport 0000:00:00.0: AER: Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 58.501740] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 58.512919] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 58.521306] pcieport 0000:00:00.0: [14] CmpltTO
[ 58.527422] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 58.534236] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 58.542449] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 58.549705] pcieport 0000:00:00.0: AER: device recovery failed
[ 58.555559] pcieport 0000:00:00.0: AER: Multiple Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 58.564824] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 58.576004] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 58.584390] pcieport 0000:00:00.0: [14] CmpltTO
[ 58.590506] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 58.597320] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 58.605533] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 58.612789] pcieport 0000:00:00.0: AER: device recovery failed
[ 58.618643] pcieport 0000:00:00.0: AER: Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 58.627119] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 58.638298] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 58.646684] pcieport 0000:00:00.0: [14] CmpltTO
[ 58.652800] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 58.659615] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 58.667827] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 58.675083] pcieport 0000:00:00.0: AER: device recovery failed
[ 58.680937] pcieport 0000:00:00.0: AER: Multiple Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 58.690202] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 58.701382] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 58.709768] pcieport 0000:00:00.0: [14] CmpltTO
[ 58.715884] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 58.722698] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 58.757739] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 58.764996] pcieport 0000:00:00.0: AER: device recovery failed
[ 58.770850] pcieport 0000:00:00.0: AER: Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 58.779326] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 58.790506] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 58.798892] pcieport 0000:00:00.0: [14] CmpltTO
[ 58.805008] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 58.811824] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 58.820036] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 58.827292] pcieport 0000:00:00.0: AER: device recovery failed
[ 58.833147] pcieport 0000:00:00.0: AER: Multiple Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 58.842410] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 58.853590] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 58.861976] pcieport 0000:00:00.0: [14] CmpltTO
[ 58.868092] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 58.874907] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 58.930804] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 58.938062] pcieport 0000:00:00.0: AER: device recovery failed
[ 58.943916] pcieport 0000:00:00.0: AER: Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 58.952391] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 58.963570] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 58.971957] pcieport 0000:00:00.0: [14] CmpltTO
[ 58.978073] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 58.984887] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 59.013737] ata24: failed to resume link (SControl FFFFFFFF)
[ 59.013739] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 59.026674] pcieport 0000:00:00.0: AER: device recovery failed
[ 59.032528] pcieport 0000:00:00.0: AER: Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 59.373837] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 59.385016] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 59.393403] pcieport 0000:00:00.0: [14] CmpltTO
[ 59.399520] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 59.406334] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 59.425281] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 59.432538] pcieport 0000:00:00.0: AER: device recovery failed
[ 59.438392] pcieport 0000:00:00.0: AER: Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 59.579607] ata24: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[ 59.579609] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 59.597339] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 59.605725] pcieport 0000:00:00.0: [14] CmpltTO
[ 59.611841] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 59.618656] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 59.836820] ahci 0000:01:00.0: AHCI controller unavailable!
[ 59.836823] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 59.849775] pcieport 0000:00:00.0: AER: device recovery failed
[ 59.855676] pcieport 0000:00:00.0: AER: Multiple Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 59.864986] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 59.876192] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 59.930810] pcieport 0000:00:00.0: [14] CmpltTO
[ 59.936942] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 59.943758] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 59.951975] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)
[ 59.959240] pcieport 0000:00:00.0: AER: device recovery failed
[ 59.965096] pcieport 0000:00:00.0: AER: Uncorrected (Non-Fatal) error received: 0000:00:00.0
[ 59.973573] pcieport 0000:00:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
[ 59.984753] pcieport 0000:00:00.0: device [14e4:2712] error status/mask=00044000/00400000
[ 59.993139] pcieport 0000:00:00.0: [14] CmpltTO
[ 59.999258] pcieport 0000:00:00.0: [18] MalfTLP (First)
[ 60.006072] pcieport 0000:00:00.0: AER: TLP Header: 60000001 0100000f 000000ff ffffe000
[ 60.014287] ahci 0000:01:00.0: AER: can't recover (no error_detected callback)

I'm using Linux pi-nas 6.1.0-rpi8-rpi-2712 https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/1 SMP PREEMPT Debian 1:6.1.73-1+rpt1 (2024-01-25) aarch64 GNU/Linux

Would anyone have any idea what I could be doing wrong?

ezaul commented 9 months ago

Problem solved, everything works normally, fix these changes

# Back up the current dtb
sudo cp /boot/firmware/bcm2712-rpi-5-b.dtb /boot/firmware/bcm2712-rpi-5-b.dtb.bak

# Decompile the current dtb (ignore warnings)
dtc -I dtb -O dts /boot/firmware/bcm2712-rpi-5-b.dtb -o ~/test.dts

# Edit the file
nano ~/test.dts

# Change the line: msi-parent = <0x2f>; (under `pcie@110000`)
# To: msi-parent = <0x66>;
# Then save the file.

# Recompile the dtb and move it back to the firmware directory
dtc -I dts -O dtb ~/test.dts -o ~/test.dtb
sudo mv ~/test.dtb /boot/firmware/bcm2712-rpi-5-b.dtb
[    7.721041] ata4.00: ATA-10: ST1000LM035-1RK172, LCM2, max UDMA/133
[    7.730158] ata4.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 32), AA
[    7.779478] ata4.00: configured for UDMA/133
[    7.779606] scsi 3:0:0:0: Direct-Access     ATA      ST1000LM035-1RK1 LCM2 PQ: 0 ANSI: 5
[    7.779911] sd 3:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[    7.779916] sd 3:0:0:0: [sda] 4096-byte physical blocks
[    7.779943] sd 3:0:0:0: [sda] Write Protect is off
[    7.779948] sd 3:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    7.779987] sd 3:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    7.780011] sd 3:0:0:0: [sda] Preferred minimum I/O size 4096 bytes
[    7.923830]  sda: sda1
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 931.5G  0 disk
└─sda1        8:1    0 931.5G  0 part
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000LM035-1RK1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 5712D292-AB27-442A-977E-E283C0790993
Device Start End Sectors Size Type
/dev/sda1 2048 1953525134 1953523087 931.5G Linux filesystem
hdparm -Ttv /dev/sda

/dev/sda:
 multcount     = 16 (on)
 IO_support    =  1 (32-bit)
 readonly      =  0 (off)
 readahead     = 256 (on)
 geometry      = 121601/255/63, sectors = 1953525168, start = 0
 Timing cached reads:   3958 MB in  2.00 seconds = 1979.00 MB/sec
 Timing buffered disk reads: 382 MB in  3.01 seconds = 126.76 MB/sec
albertz commented 6 months ago

I might have a similar problem. The SATA controller seems to be detected. I already tried several:

Although these are two different SATA controllers, in all cases lspci shows it as SATA controller: ASMedia Technology Inc. ASM1166 Serial ATA Controller (rev 02), which is a bit weird? But maybe it's really the same chip in both cases. And also, the behavior in all three cases seems almost identical. Whenever I attach some SATA drive, I get very similar errors as you (but I think not exactly the same, not sure; I don't get those PCIe Bus Errors) (see log below). Also the boot time is much slower, it seems to wait for them until it probably hits some timeout or so.

Can you explain a bit your solution? I have no idea what you do there. I don't know what this dtb file is. Maybe the RP firmware? I don't really understand what it means to decompile it. I don't know this dtc tool. (But I guess, so far I can just read a bit about that myself.) But then most crucially, how did you get the idea to change msi-parent = <0x2f>; (under pcie@110000) to msi-parent = <0x66>;? What does this mean, and what is the reasoning behind this change?

Should I just try to do the same? Is this safe to try out?


dmesg, when the SATA drive is attached:

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x414fd0b1]
[    0.000000] Linux version 6.8.0-1004-raspi (buildd@bos03-arm64-035) (aarch64-linux-gnu-gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #4-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 02:29:55 UTC 2024 (Ubuntu 6.8.0-1004.4-raspi 6.8.1)
...
[    0.000000] Kernel command line: reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1  smsc95xx.macaddr=2C:CF:67:1D:E3:DA vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000  console=ttyAMA10,115200 multipath=off dwc_otg.lpm_enable=0 console=tty1 root=LABEL=writable rootfstype=ext4 rootwait fixrtc cfg80211.ieee80211_regdom=GB
...
[    2.337222] ahci 0000:01:00.0: version 3.0
[    2.372148] ahci 0000:01:00.0: enabling device (0000 -> 0002)
[    2.377943] ahci 0000:01:00.0: ASM1166 has only six ports
[    2.383366] ahci 0000:01:00.0: forcing port_map 0x33f -> 0x3f
[    2.389303] ahci 0000:01:00.0: SSS flag set, parallel bus scan disabled
[    2.396008] ahci 0000:01:00.0: AHCI 0001.0301 32 slots 32 ports 6 Gbps 0x3f impl SATA mode
[    2.404315] ahci 0000:01:00.0: flags: 64bit ncq sntf stag pm led only pio sxs deso sadm sds apst 
[    2.435601] scsi host0: ahci
[    2.438732] scsi host1: ahci
[    2.441805] scsi host2: ahci
[    2.444860] scsi host3: ahci
[    2.447907] scsi host4: ahci
[    2.450959] scsi host5: ahci
...
[    2.525188] scsi host29: ahci
[    2.528296] scsi host30: ahci
[    2.531408] scsi host31: ahci
[    2.534445] ata1: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082100 irq 43 lpm-pol 0
[    2.543096] ata2: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082180 irq 43 lpm-pol 0
[    2.551745] ata3: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082200 irq 43 lpm-pol 0
[    2.560399] ata4: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082280 irq 43 lpm-pol 0
[    2.569049] ata5: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082300 irq 43 lpm-pol 0
[    2.577703] ata6: SATA max UDMA/133 abar m8192@0x1b00082000 port 0x1b00082380 irq 43 lpm-pol 0
[    2.586354] ata7: DUMMY
[    2.588804] ata8: DUMMY
[    2.591254] ata9: DUMMY
[    2.593702] ata10: DUMMY
...
[    6.186644] ata1: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[    6.450379] ahci 0000:01:00.0: AHCI controller unavailable!
[    6.745463] ahci 0000:01:00.0: AHCI controller unavailable!
[   13.851180] ata2: failed to resume link (SControl FFFFFFFF)
[   18.486511] ata2: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[   20.229121] ahci 0000:01:00.0: AHCI controller unavailable!
[   20.813486] ahci 0000:01:00.0: AHCI controller unavailable!
[   28.787205] ata3: failed to resume link (SControl FFFFFFFF)
[   33.422507] ata3: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[   35.165114] ahci 0000:01:00.0: AHCI controller unavailable!
[   35.749467] ahci 0000:01:00.0: AHCI controller unavailable!
[   43.723197] ata4: failed to resume link (SControl FFFFFFFF)
[   48.358487] ata4: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[   50.101096] ahci 0000:01:00.0: AHCI controller unavailable!
[   50.685459] ahci 0000:01:00.0: AHCI controller unavailable!
[   58.659196] ata5: failed to resume link (SControl FFFFFFFF)
[   63.294474] ata5: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[   65.037082] ahci 0000:01:00.0: AHCI controller unavailable!
[   65.621433] ahci 0000:01:00.0: AHCI controller unavailable!
[   73.595195] ata6: failed to resume link (SControl FFFFFFFF)
[   78.230476] ata6: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
[   79.973077] ahci 0000:01:00.0: AHCI controller unavailable!
...

Running lspci is also somewhat slow and takes a couple of seconds to complete. lspci -vv:

0000:01:00.0 SATA controller: ASMedia Technology Inc. ASM1166 Serial ATA Controller (rev 02) (prog-if 01 [AHCI 1.0])
        Subsystem: ZyDAS Technology Corp. ASM1166 Serial ATA Controller
        !!! Unknown header type 7f
        Interrupt: pin ? routed to IRQ 43
        Region 0: Memory at 1b00080000 (32-bit, non-prefetchable) [size=8K]
        Region 5: Memory at 1b00082000 (32-bit, non-prefetchable) [size=8K]
        Expansion ROM at 1b00000000 [disabled] [size=512K]
        Kernel driver in use: ahci
        Kernel modules: ahci

I saw that you also posted in the Raspberry Pi forum: Raspberry Pi 5 PCIe Bus Error - ASM1166 where your lspci -vv output shows a very similar error?

ezaul commented 6 months ago

Hi Albertz!

Now everything is working normally, I can update my raspiberry 5, the only thing I always have to do, after updating and recompiling dtb, I'll give you a great recipe!

First, update to the new kernel, I currently have 6.6.31-v8-16k+

#rpi-update

After this, restarting the system will take a while, as you mentioned, always leave your HDDs already connected and turned on...

Now sir, you must follow this!

Back up the current dtb

sudo cp /boot/firmware/bcm2712-rpi-5-b.dtb /boot/firmware/bcm2712-rpi-5-b.dtb.bak

Decompile the current dtb (ignore warnings)

dtc -I dtb -O dts /boot/firmware/bcm2712-rpi-5-b.dtb -o ~/test.dts

Edit the file

nano ~/test.dts

now look for pcie@110000 {

change the value of the msi-parent = parameter to the same value as the phandle = parameter below example: if your value is phandle = <0x6e> put the same in msi-parent = <0x6e>

and recompile the file following this Then save the file

Recompile the dtb and move it back to the firmware directory

dtc -I dts -O dtb ~/test.dts -o ~/test.dtb sudo mv ~/test.dtb /boot/firmware/bcm2712-rpi-5-b.dtb

reboot

Mine looked like this in the last update

 pcie@110000 {
                        compatible = "brcm,bcm2712-pcie";
                        reg = <0x10 0x110000 0x00 0x9310>;
                        device_type = "pci";
                        max-link-speed = <0x02>;
                        #address-cells = <0x03>;
                        #interrupt-cells = <0x01>;
                        #size-cells = <0x02>;
                        interrupt-parent = <0x01>;
                        interrupts = <0x00 0xdf 0x04 0x00 0xe0 0x04>;
                        interrupt-names = "pcie\0msi";
                        interrupt-map-mask = <0x00 0x00 0x00 0x07>;
                        interrupt-map = <0x00 0x00 0x00 0x01 0x01 0x00 0xdb 0x04 0x00 0x00 0x00 0x02 0x01 0x00 0xdc 0x04 0x00 0x00 0x00 0x03 0x01 0x00 0xdd 0x04 0x00 0x00 0x00 0x04 0x01 0x00 0xde 0x04>;
                        resets = <0x2c 0x07 0x2c 0x2b 0x2d>;
                        reset-names = "swinit\0bridge\0rescal";
                        msi-controller;
                        msi-parent = <0x6e>;
                        ranges = <0x2000000 0x00 0x00 0x1b 0x00 0x00 0xfffffffc 0x43000000 0x04 0x00 0x18 0x00 0x03 0x00>;
                        dma-ranges = <0x3000000 0x10 0x00 0x00 0x00 0x10 0x00>;
                        brcm,enable-l1ss;
                        status = "disabled";
                        phandle = <0x6e>;
NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
sda           8:0    0 931.5G  0 disk
└─md0         9:0    0   1.7T  0 raid5 /srv/dev-disk-by-uuid-d62a4292-231b-45c6-89aa-bb21b62915ac
sdb           8:16   0 931.5G  0 disk
└─md0         9:0    0   1.7T  0 raid5 /srv/dev-disk-by-uuid-d62a4292-231b-45c6-89aa-bb21b62915ac
sdc           8:32   0 894.3G  0 disk
└─md0         9:0    0   1.7T  0 raid5 /srv/dev-disk-by-uuid-d62a4292-231b-45c6-89aa-bb21b62915ac
sdd           8:48   0   1.8T  0 disk
└─sdd1        8:49   0   1.8T  0 part  /srv/dev-disk-by-uuid-21e197d5-42b6-461a-b50f-5f3955b3b80a

image

image

albertz commented 6 months ago

Hi Ezaul! Thanks a lot for your answer!

Hi Albertz!

(It's just Albert. :) Albert Zeyer is my full name, I just liked albertz as a good fitting username here.)

Now everything is working normally, I can update my raspiberry 5, the only thing I always have to do, after updating and recompiling dtb, I'll give you a great recipe!

But I wonder, the latest message in the forum sounded like the problems are back? Although I realize now, that post is quite old, I guess this is outdated.

First, update to the new kernel, I currently have 6.6.31-v8-16k+

#rpi-update

I don't have that command. I installed Ubuntu server 24.04 on it. I have rpi-eeprom-update though. Is that the same? I will not do that for now. But I have recently done apt update and apt upgrade. That should also update the kernel.

I have kernel 6.8.0-1004-raspi.

But maybe that should be fine? I will try to follow the steps.

Back up the current dtb

sudo cp /boot/firmware/bcm2712-rpi-5-b.dtb /boot/firmware/bcm2712-rpi-5-b.dtb.bak

Strangely, there was already such a bak file. I made another bak2 file.

Decompile the current dtb (ignore warnings)

dtc -I dtb -O dts /boot/firmware/bcm2712-rpi-5-b.dtb -o ~/test.dts

Edit the file

nano ~/test.dts

now look for pcie@110000 {

Ok... Can you explain a bit, why this section? Why not pcie@100000 or pcie@120000 or so?

change the value of the msi-parent = parameter to the same value as the phandle = parameter below example: if your value is phandle = <0x6e> put the same in msi-parent = <0x6e>

Ok. My old values were:

msi-parent = <0x2c>;
phandle = <0x67>;

I now changed msi-parent to 0x67.

I have no idea what this does. Can you explain a bit?

and recompile the file following this Then save the file

Recompile the dtb and move it back to the firmware directory

dtc -I dts -O dtb ~/test.dts -o ~/test.dtb sudo mv ~/test.dtb /boot/firmware/bcm2712-rpi-5-b.dtb

The sudo mv triggered this warning/error:

mv: failed to preserve ownership for '/boot/firmware/bcm2712-rpi-5-b.dtb': Operation not permitted

But I guess I can also ignore this?

reboot

Wow, I think it worked! :) I already recognized that the green LED on the SATA controller next to the attached SATA cable was blinking a bit different than before. And startup was much faster. And in dmesg, I now see this:

[    8.101051] ata1: link is slow to respond, please be patient (ready=0)
[    8.367081] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    8.374843] ata1.00: ATA-11: ST4000NE001-2MA101, EN01, max UDMA/133
[    8.394013] ata1.00: 7814037168 sectors, multi 16: LBA48 NCQ (depth 32), AA
[    8.401503] ata1.00: Features: NCQ-sndrcv
[    8.420145] ata1.00: configured for UDMA/133
[    8.424652] scsi 0:0:0:0: Direct-Access     ATA      ST4000NE001-2MA1 EN01 PQ: 0 ANSI: 5
[    8.433197] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    8.433244] sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[    8.446314] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    8.451576] sd 0:0:0:0: [sda] Write Protect is off
[    8.456394] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    8.456423] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    8.465537] sd 0:0:0:0: [sda] Preferred minimum I/O size 4096 bytes
[    8.745187] ata2: SATA link down (SStatus 0 SControl 300)
[    8.914641] sd 0:0:0:0: [sda] Attached SCSI disk
[    9.057245] ata3: SATA link down (SStatus 0 SControl 300)
[    9.369195] ata4: SATA link down (SStatus 0 SControl 300)
[    9.681197] ata5: SATA link down (SStatus 0 SControl 300)
[    9.993191] ata6: SATA link down (SStatus 0 SControl 300)

And lsblk:

NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0 33.7M  1 loop /snap/snapd/21467
loop1         7:1    0 33.7M  1 loop /snap/snapd/21761
sda           8:0    0  3.6T  0 disk 
mmcblk0     179:0    0 29.7G  0 disk 
├─mmcblk0p1 179:1    0  512M  0 part /boot/firmware
└─mmcblk0p2 179:2    0 29.2G  0 part /

And sudo lspci -vv:

0000:01:00.0 SATA controller: ASMedia Technology Inc. ASM1166 Serial ATA Controller (rev 02) (prog-if 01 [AHCI 1.0])
        Subsystem: ZyDAS Technology Corp. ASM1166 Serial ATA Controller                                                    
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-               
        Latency: 0                                                                                                         
        Interrupt: pin A routed to IRQ 44                                                                                  
        Region 0: Memory at 1b00080000 (32-bit, non-prefetchable) [size=8K]                                                
        Region 5: Memory at 1b00082000 (32-bit, non-prefetchable) [size=8K]                                                
        Expansion ROM at 1b00000000 [virtual] [disabled] [size=512K]                                                       
        Capabilities: [40] Power Management version 3                                                                      
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)                                 
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-                                                     
        Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+                                                
                Address: 00000000fffffffc  Data: 6540                                                                      
        Capabilities: [80] Express (v2) Endpoint, MSI 00                                                                   
                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 0W   
                DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+                                                          
                        RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+                                                       
                        MaxPayload 256 bytes, MaxReadReq 512 bytes                                                         
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-                                       
                LnkCap: Port #0, Speed 8GT/s, Width x2, ASPM L0s L1, Exit Latency L0s <4us, L1 <64us                       
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+                                                   
                LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+                                                    
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-                                           
                LnkSta: Speed 8GT/s, Width x1 (downgraded)                                                                 
                        TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-                                                  
                DevCap2: Completion Timeout: Not Supported, TimeoutDis- NROPrPrP- LTR-                                     
                         10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-                               
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-  
                         FRS- TPHComp- ExtTPHComp-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- 10BitTagReq- OBFF Disabled,
                         AtomicOpsCtl: ReqEn-
                LnkCap2: Supported Link Speeds: 2.5-8GT/s, Crosslink- Retimer- 2Retimers- DRS-
                LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis+
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance Preset/De-emphasis: -6dB de-emphasis, 0dB preshoot
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete+ EqualizationPhase1+
                         EqualizationPhase2+ EqualizationPhase3+ LinkEqualizationRequest-
                         Retimer- 2Retimers- CrosslinkRes: unsupported
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
                        MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                HeaderLog: 00000000 00000000 00000000 00000000
        Capabilities: [130 v1] Secondary PCI Express
                LnkCtl3: LnkEquIntrruptEn- PerformEqu-
                LaneErrStat: 0 
        Kernel driver in use: ahci
        Kernel modules: ahci

And sudo hdparm -I /dev/sda:

/dev/sda:                                                    

ATA device, with non-removable media                                                                                       
        Model Number:       ST4000NE001-2MA101                       
        Serial Number:      WS254FSH                                
        Firmware Revision:  EN01                                                                                           
        Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:                                                    
        Used: unknown (minor revision code 0xffff) 
        Supported: 11 10 9 8 7 6 5       
        Likely used: 11                     
...
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, no device specific minimum
        R/W multiple sector transfer: Max = 16  Current = 16
        Recommended acoustic management value: 254, current value: 0
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4 
             Cycle time: no flow control=120ns  IORDY flow control=120ns
...                 

My plan is now to attach at least another HDD and make a ZFS RAID.

Additionally, I wonder if I should keep using the micro SD card for the OS, or maybe use a small SSD instead?

My chaotic setup:

image
albertz commented 5 months ago

I still don't really understand those changes in the dtb (dts) file. In any case, to me this sounds like some upstream bug of the Raspberry Pi Linux kernel (and/or the firmware?) and it should not be needed that we always edit this file? So I reported this upstream: https://github.com/raspberrypi/linux/issues/6214 (not sure if this was the right place...)