[VIM3] ASMedia SATA controller issues after replacing linux-khadas with linux-aml

Hi,
I’m running VIM-3 board based NAS with ASmedia SATA controller attached to m.2 PCIe port.
After recent upgrade to Manjaro 22.12 the linux-khadas kernel package (5.19.9-1-MANJARO-ARM-KHADAS) has been replaced with linux-aml (6.0.11-1) one.

After the update the ASMedia controller is still detected, but it seems that it’s not initialized as no of the connected drives is reporting back to system.
After reinstalling the linux-khadas it works again. Seems that new kernel is either missing some module (dependency?) or is connfigured differently. I’ve tried to debug it a little, but I’m out of ideas.

I’ve got the lspci and dmesg reports for both kernels, but can’t share links yet.

I’m no expert on the Vims, PCIe or SATA, but it’s likely a kernel config issue.

Could it be this one, @spikerguy ?

Will look st a diff and compare the old config and update it tonight.

Great, let me know so I can test it out.

Please share more details about this controller, the chip model or something to look into its config.

cause the config mentioned by Strit was also not enabled in linux-khadas

It’s some cheap SA3160J based PCIe to SATA 16port controller.
This is lspci output for linux-khadas:

	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 19
	Bus: primary=00, secondary=01, subordinate=ff, sec-latency=0
	I/O behind bridge: f000-0fff [disabled] [16-bit]
	Memory behind bridge: fc700000-fc7fffff [size=1M] [32-bit]
	Prefetchable memory behind bridge: fc800000-fc8fffff [size=1M] [32-bit]
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	Expansion ROM at fc900000 [virtual] [disabled] [size=64K]
	BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [40] Power Management version 3
		Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA 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: 000000000172c508  Data: 0000
	Capabilities: [70] Express (v2) Root Port (Slot-), MSI 00
		DevCap:	MaxPayload 256 bytes, PhantFunc 0
			ExtTag- RBE+
		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 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <1us, L1 <2us
			ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+
		LnkCtl:	ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 5GT/s, Width x1
			TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
		RootCap: CRSVisible+
		RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+
		RootSta: PME ReqID 0000, PMEStatus- PMEPending-
		DevCap2: Completion Timeout: Range ABCD, TimeoutDis+ NROPrPrP+ LTR-
			 10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
			 EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
			 FRS- LN System CLS Not Supported, TPHComp- ExtTPHComp- ARIFwd-
			 AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS-
		DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- 10BitTagReq- OBFF Disabled, ARIFwd-
			 AtomicOpsCtl: ReqEn- EgressBlck-
		LnkCap2: Supported Link Speeds: 2.5-5GT/s, Crosslink- Retimer- 2Retimers- DRS-
		LnkCtl2: Target Link Speed: 5GT/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 v2] 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
		RootCmd: CERptEn+ NFERptEn+ FERptEn+
		RootSta: CERcvd+ MultCERcvd+ UERcvd- MultUERcvd-
			 FirstFatal- NonFatalMsg- FatalMsg- IntMsg 0
		ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000
	Capabilities: [148 v1] L1 PM Substates
		L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2- ASPM_L1.1+ L1_PM_Substates+
			  PortCommonModeRestoreTime=55us PortTPowerOnTime=12us
		L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
			   T_CommonMode=55us
		L1SubCtl2: T_PwrOn=10us
	Kernel driver in use: pcieport

01:00.0 SATA controller: ASMedia Technology Inc. Device 1064 (rev 02) (prog-if 01 [AHCI 1.0])
	Subsystem: ZyDAS Technology Corp. 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 20
	Region 0: Memory at fc700000 (32-bit, non-prefetchable) [size=8K]
	Region 5: Memory at fc702000 (32-bit, non-prefetchable) [size=8K]
	Expansion ROM at fc800000 [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: 000000000172c508  Data: 0001
	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 x1, 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 5GT/s (downgraded), 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
	Kernel driver in use: ahci

And this from linux-aml:

00:00.0 PCI bridge: Synopsys, Inc. DWC_usb3 / PCIe bridge (rev 01) (prog-if 00 [Normal decode])
	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 19
	Bus: primary=00, secondary=01, subordinate=ff, sec-latency=0
	I/O behind bridge: f000-0fff [disabled] [16-bit]
	Memory behind bridge: fff00000-000fffff [disabled] [32-bit]
	Prefetchable memory behind bridge: fff00000-000fffff [disabled] [32-bit]
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
	Expansion ROM at fc700000 [virtual] [disabled] [size=64K]
	BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [40] Power Management version 3
		Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA 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: 000000007fb99000  Data: 0000
	Capabilities: [70] Express (v2) Root Port (Slot-), MSI 00
		DevCap:	MaxPayload 256 bytes, PhantFunc 0
			ExtTag- RBE+
		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 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <1us, L1 <2us
			ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+
		LnkCtl:	ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 5GT/s, Width x1
			TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
		RootCap: CRSVisible+
		RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+
		RootSta: PME ReqID 0000, PMEStatus- PMEPending-
		DevCap2: Completion Timeout: Range ABCD, TimeoutDis+ NROPrPrP+ LTR-
			 10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
			 EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
			 FRS- LN System CLS Not Supported, TPHComp- ExtTPHComp- ARIFwd-
			 AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS-
		DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- 10BitTagReq- OBFF Disabled, ARIFwd-
			 AtomicOpsCtl: ReqEn- EgressBlck-
		LnkCap2: Supported Link Speeds: 2.5-5GT/s, Crosslink- Retimer- 2Retimers- DRS-
		LnkCtl2: Target Link Speed: 5GT/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 v2] 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: 0e, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
			MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
		HeaderLog: 00000000 00000000 00000000 00000000
		RootCmd: CERptEn+ NFERptEn+ FERptEn+
		RootSta: CERcvd+ MultCERcvd+ UERcvd+ MultUERcvd-
			 FirstFatal- NonFatalMsg+ FatalMsg- IntMsg 0
		ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000
	Capabilities: [148 v1] L1 PM Substates
		L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2- ASPM_L1.1+ L1_PM_Substates+
			  PortCommonModeRestoreTime=55us PortTPowerOnTime=12us
		L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
			   T_CommonMode=55us
		L1SubCtl2: T_PwrOn=10us
	Kernel driver in use: pcieport

01:00.0 SATA controller: ASMedia Technology Inc. Device 1064 (rev 02) (prog-if 01 [AHCI 1.0])
	Subsystem: ZyDAS Technology Corp. 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-
	Interrupt: pin A routed to IRQ 18
	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: 0000000000000000  Data: 0000
	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 128 bytes, MaxReadReq 512 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 Disabled; RCB 64 bytes, Disabled- CommClk-
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 5GT/s (downgraded), 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-
		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

The linux-aml does not seem to load ahci for controller.

@spikerguy any progress here?
I’ve seen new commits in kernel repo - should I wait for 6.1 and see any upstream fixes?

I have updated ahci config on 6.1 linux-aml

Please try it from unstable.

I have pushed this change now

Once its build you can test it and see if that helps.

1 Like

Unfortunately no change.
I’ve also added libahci and ahci do modules section in /etc/mkinitcpio.conf but that also change nothing.

I’ll try veryfying it vorking also on x64 6.x mainline kernel. Just need to find some spare time to plug it into my main machine.

Will let You know.

Testing with current Manjaro x64 ISO v22.0, kernel 6.1.1-1-MANJARO card is detected with all conncted disks without any additional steps with ahci driver loaded automatically.

sudo lspci -vvvk -s 0b:00.0                                                                                                                 1 ✘ 
0b:00.0 SATA controller: ASMedia Technology Inc. Device 1064 (rev 02) (prog-if 01 [AHCI 1.0])
        Subsystem: ZyDAS Technology Corp. 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, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 52
        IOMMU group: 16
        Region 0: Memory at bb482000 (32-bit, non-prefetchable) [size=8K]
        Region 5: Memory at bb480000 (32-bit, non-prefetchable) [size=8K]
        Expansion ROM at bb400000 [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: 00000000fee0d000  Data: 0021
        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 x1, 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
                        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: -3.5dB, 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

Manjaro arm is very different to manjaro x64

There is no point in comparing it.

On x64, Ive had some issues with ASPM - when enabled, card behaved after some time similiary to when installed in vim3 board.
After disabling aspm with pcie_aspm=off kernel param, is started to work stable.

Unfortunately same setting does not fix isses on Vim3, but maybe that can be some lead.

Where did you place the kernel param?

in boot partition extlinux/extlinux.conf. Verified that it’s in /proc/cmdline, and in dmesg output (PCIe ASPM is disabled).

1 Like

FInnaly got time to compare dmesg outputs. In 6.x kernel there is some issue initializing acpi driver:

linux-khadas dmesg:

[    0.571773] ahci 0000:01:00.0: version 3.0
[    0.571790] ahci 0000:01:00.0: enabling device (0000 -> 0002)
[    0.572048] ahci 0000:01:00.0: SSS flag set, parallel bus scan disabled
[    0.582279] ahci 0000:01:00.0: AHCI 0001.0301 32 slots 24 ports 6 Gbps 0xffff0f impl SATA mode
[    0.582291] ahci 0000:01:00.0: flags: 64bit ncq sntf stag pm led only pio sxs deso sadm sds apst 
[    0.589451] scsi host0: ahci
[    0.589842] scsi host1: ahci
[    0.590159] scsi host2: ahci
[    0.590453] scsi host3: ahci
[    0.590768] scsi host4: ahci
[    0.591059] scsi host5: ahci
[    0.591347] scsi host6: ahci
[    0.591727] scsi host7: ahci
[    0.592038] scsi host8: ahci
[    0.592378] scsi host9: ahci
[    0.592669] scsi host10: ahci
[    0.592970] scsi host11: ahci
[    0.593281] scsi host12: ahci
[    0.593584] scsi host13: ahci
[    0.593873] scsi host14: ahci
[    0.594186] scsi host15: ahci
[    0.594480] scsi host16: ahci
[    0.594778] scsi host17: ahci
[    0.595090] scsi host18: ahci
[    0.595380] scsi host19: ahci
[    0.595691] scsi host20: ahci
[    0.595981] scsi host21: ahci
[    0.596291] scsi host22: ahci
[    0.596602] scsi host23: ahci
[    0.596720] ata1: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702100 irq 20
[    0.596728] ata2: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702180 irq 20
[    0.596735] ata3: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702200 irq 20
[    0.596741] ata4: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702280 irq 20
[    0.596745] ata5: DUMMY
[    0.596749] ata6: DUMMY
[    0.596752] ata7: DUMMY
[    0.596756] ata8: DUMMY
[    0.596760] ata9: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702500 irq 20
[    0.596766] ata10: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702580 irq 20
[    0.596771] ata11: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702600 irq 20
[    0.596777] ata12: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702680 irq 20
[    0.596782] ata13: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702700 irq 20
[    0.596788] ata14: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702780 irq 20
[    0.596793] ata15: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702800 irq 20
[    0.596798] ata16: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702880 irq 20
[    0.596804] ata17: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702900 irq 20
[    0.596809] ata18: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702980 irq 20
[    0.596814] ata19: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702a00 irq 20
[    0.596820] ata20: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702a80 irq 20
[    0.596825] ata21: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702b00 irq 20
[    0.596830] ata22: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702b80 irq 20
[    0.596835] ata23: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702c00 irq 20
[    0.596840] ata24: SATA max UDMA/133 abar m8192@0xfc702000 port 0xfc702c80 irq 20

And later ataXX deviecs link negotians, sd-type devices detection, etc.

linux-amd dmesg:

[    1.584240] ahci 0000:01:00.0: version 3.0
[    1.584267] ahci: probe of 0000:01:00.0 failed with error -22

1 Like

Also the BAR assignment differ (these comes just before ahci initialization):
linux-khadas:

    0.485695] dw-pcie fc000000.pcie: error -ENXIO: IRQ index 1 not found
[    0.488876] meson-pcie fc000000.pcie: host bridge /soc/pcie@fc000000 ranges:
[    0.488918] meson-pcie fc000000.pcie:       IO 0x00fc600000..0x00fc6fffff -> 0x0000000000
[    0.488938] meson-pcie fc000000.pcie:      MEM 0x00fc700000..0x00fdffffff -> 0x00fc700000
[    0.489096] meson-pcie fc000000.pcie: iATU unroll: enabled
[    0.489104] meson-pcie fc000000.pcie: Detected iATU regions: 4 outbound, 4 inbound
[    0.530482] meson-pcie fc000000.pcie: error: wait linkup timeout
[    0.562734] meson-pcie fc000000.pcie: Link up
[    0.562868] meson-pcie fc000000.pcie: PCI host bridge to bus 0000:00
[    0.562877] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.562885] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff]
[    0.562891] pci_bus 0000:00: root bus resource [mem 0xfc700000-0xfdffffff]
[    0.562918] pci 0000:00:00.0: [16c3:abcd] type 01 class 0x060400
[    0.562937] pci 0000:00:00.0: reg 0x38: [mem 0x00000000-0x0000ffff pref]
[    0.562978] pci 0000:00:00.0: supports D1
[    0.562984] pci 0000:00:00.0: PME# supported from D0 D1 D3hot D3cold
[    0.566889] pci 0000:01:00.0: [1b21:1064] type 00 class 0x010601
[    0.566935] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00001fff]
[    0.567025] pci 0000:01:00.0: reg 0x24: [mem 0x00000000-0x00001fff]
[    0.567048] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0007ffff pref]
[    0.567072] pci 0000:01:00.0: Max Payload Size set to 256 (was 128, max 512)
[    0.567086] pci 0000:01:00.0: enabling Extended Tags
[    0.567242] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.567353] pci 0000:01:00.0: 4.000 Gb/s available PCIe bandwidth, limited by 5.0 GT/s PCIe x1 link at 0000:00:00.0 (capable of 7.876 Gb/s with 8.0 GT/s PCIe x1 link)
[    0.571033] pci 0000:00:00.0: BAR 14: assigned [mem 0xfc700000-0xfc7fffff]
[    0.571042] pci 0000:00:00.0: BAR 15: assigned [mem 0xfc800000-0xfc8fffff pref]
[    0.571049] pci 0000:00:00.0: BAR 6: assigned [mem 0xfc900000-0xfc90ffff pref]
[    0.571059] pci 0000:01:00.0: BAR 6: assigned [mem 0xfc800000-0xfc87ffff pref]
[    0.571066] pci 0000:01:00.0: BAR 0: assigned [mem 0xfc700000-0xfc701fff]
[    0.571079] pci 0000:01:00.0: BAR 5: assigned [mem 0xfc702000-0xfc703fff]
[    0.571093] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    0.571100] pci 0000:00:00.0:   bridge window [mem 0xfc700000-0xfc7fffff]
[    0.571106] pci 0000:00:00.0:   bridge window [mem 0xfc800000-0xfc8fffff pref]
[    0.571337] pcieport 0000:00:00.0: PME: Signaling with IRQ 19
[    0.571593] pcieport 0000:00:00.0: AER: enabled with IRQ 19
[    0.571773

linux-aml:

[    0.504859] dw-pcie fc000000.pcie: error -ENXIO: IRQ index 1 not found
[    0.507943] meson-pcie fc000000.pcie: host bridge /soc/pcie@fc000000 ranges:
[    0.507971] meson-pcie fc000000.pcie:       IO 0x00fc600000..0x00fc6fffff -> 0x0000000000
[    0.507988] meson-pcie fc000000.pcie:      MEM 0x00fc700000..0x00fdffffff -> 0x00fc700000
[    0.508125] meson-pcie fc000000.pcie: iATU unroll: enabled
[    0.508131] meson-pcie fc000000.pcie: iATU regions: 4 ob, 4 ib, align 64K, limit 4G
[    0.549591] meson-pcie fc000000.pcie: error: wait linkup timeout
[    0.581828] meson-pcie fc000000.pcie: PCIe Gen.2 x1 link up
[    0.581910] meson-pcie fc000000.pcie: PCI host bridge to bus 0000:00
[    0.581917] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.581925] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff]
[    0.581931] pci_bus 0000:00: root bus resource [mem 0xfc700000-0xfdffffff]
[    0.581955] pci 0000:00:00.0: [16c3:abcd] type 01 class 0x060400
[    0.581973] pci 0000:00:00.0: reg 0x38: [mem 0x00000000-0x0000ffff pref]
[    0.582013] pci 0000:00:00.0: supports D1
[    0.582019] pci 0000:00:00.0: PME# supported from D0 D1 D3hot D3cold
[    0.585676] pci 0000:01:00.0: [1b21:1064] type 00 class 0x010601
[    1.322963] pci 0000:01:00.0: Max Payload Size set to 256 (was 128, max 512)
[    1.322979] pci 0000:01:00.0: enabling Extended Tags
[    1.366510] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    1.540049] pci 0000:01:00.0: 4.000 Gb/s available PCIe bandwidth, limited by 5.0 GT/s PCIe x1 link at 0000:00:00.0 (capable of 7.876 Gb/s with 8.0 GT/s PCIe x1 link)
[    1.540274] pci 0000:00:00.0: BAR 6: assigned [mem 0xfc700000-0xfc70ffff pref]
[    1.540287] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    1.540501] pcieport 0000:00:00.0: PME: Signaling with IRQ 19
[    1.540727] pcieport 0000:00:00.0: AER: enabled with IRQ 19

ARM boards BAR capabilities are very limited, compared to x86_64. Which is also the reason why dGPUs don’t work on most ARM boards.

Yeah, but both dmesg outputs are from same board (linux-khadas 5.x and linux-aml 6.x kernels).
I do not think that bar is troublemaker here, but strange that board is being initialized so differently.