mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Linnaea Lavia <linnaea-von-lavia@live.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: FUKAUMI Naoki <naoki@radxa.com>,
	"linux-amlogic@lists.infradead.org"
	<linux-amlogic@lists.infradead.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	regressions@lists.linux.dev, Yue Wang <yue.wang@amlogic.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Subject: Re: PCIe probe failure on AmLogic A311D after 6.18-rc1
Date: Fri, 31 Oct 2025 13:34:41 +0800	[thread overview]
Message-ID: <DM4PR05MB10270506AAC1FCE53C4915CC2C7F8A@DM4PR05MB10270.namprd05.prod.outlook.com> (raw)
In-Reply-To: <20251029171542.GA1566240@bhelgaas>

On 10/30/2025 1:15 AM, Bjorn Helgaas wrote:
> On Wed, Oct 29, 2025 at 06:50:46PM +0800, Linnaea Lavia wrote:
>> On 10/29/2025 6:16 AM, Bjorn Helgaas wrote:
> 
>>> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
>>> index 214ed060ca1b..9cd12924b5cb 100644
>>> --- a/drivers/pci/quirks.c
>>> +++ b/drivers/pci/quirks.c
>>> @@ -2524,6 +2524,7 @@ static void quirk_disable_aspm_l0s_l1(struct pci_dev *dev)
>>>     * disable both L0s and L1 for now to be safe.
>>>     */
>>>    DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASMEDIA, 0x1080, quirk_disable_aspm_l0s_l1);
>>> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SYNOPSYS, 0xabcd, quirk_disable_aspm_l0s_l1);
>>>    /*
>>>     * Some Pericom PCIe-to-PCI bridges in reverse mode need the PCIe Retrain
>>
>> I have applied the patch on 6.18-rc3 but it's still trying to enable ASPM for some reasons.
> 
> Sorry, my fault, I should have made that fixup run earlier, so the
> patch should be this instead:
> 
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 214ed060ca1b..4fc04015ca0c 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -2524,6 +2524,7 @@ static void quirk_disable_aspm_l0s_l1(struct pci_dev *dev)
>    * disable both L0s and L1 for now to be safe.
>    */
>   DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASMEDIA, 0x1080, quirk_disable_aspm_l0s_l1);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SYNOPSYS, 0xabcd, quirk_disable_aspm_l0s_l1);

L1 still got enabled

# dmesg | grep -i -e pci -e iwlwifi -e aspm
[    0.130298] [      T1] PCI: CLS 0 bytes, default 64
[    5.243878] [     T48] dw-pcie fc000000.pcie: error -ENXIO: IRQ index 1 not found
[    5.294697] [     T48] meson-pcie fc000000.pcie: host bridge /soc/pcie@fc000000 ranges:
[    5.298580] [     T48] meson-pcie fc000000.pcie:       IO 0x00fc600000..0x00fc6fffff -> 0x0000000000
[    5.307484] [     T48] meson-pcie fc000000.pcie:      MEM 0x00fc700000..0x00fdffffff -> 0x00fc700000
[    5.324258] [     T48] meson-pcie fc000000.pcie: iATU: unroll T, 4 ob, 4 ib, align 64K, limit 4G
[    5.366020] [     T48] meson-pcie fc000000.pcie: error: wait linkup timeout
[    5.371376] [     T48] meson-pcie fc000000.pcie: PCIe Gen.2 x1 link up
[    5.375932] [     T48] meson-pcie fc000000.pcie: PCI host bridge to bus 0000:00
[    5.381390] [     T48] pci_bus 0000:00: root bus resource [bus 00-ff]
[    5.388280] [     T48] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff]
[    5.395226] [     T48] pci_bus 0000:00: root bus resource [mem 0xfc700000-0xfdffffff]
[    5.402942] [     T48] pci 0000:00:00.0: [16c3:abcd] type 01 class 0x060400 PCIe Root Port
[    5.410068] [     T48] pci 0000:00:00.0: ROM [mem 0x00000000-0x0000ffff pref]
[    5.416900] [     T48] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    5.422838] [     T48] pci 0000:00:00.0:   bridge window [io  0x0000-0x0fff]
[    5.429605] [     T48] pci 0000:00:00.0:   bridge window [mem 0x00000000-0x000fffff]
[    5.437147] [     T48] pci 0000:00:00.0:   bridge window [mem 0x00000000-0x000fffff pref]
[    5.445853] [     T48] pci 0000:00:00.0: Disabling ASPM L0s/L1
[    5.451334] [     T48] pci 0000:00:00.0: supports D1
[    5.455104] [     T48] pci 0000:00:00.0: PME# supported from D0 D1 D3hot D3cold
[    5.480231] [     T48] pci 0000:01:00.0: [8086:2725] type 00 class 0x028000 PCIe Endpoint
[    5.490539] [     T48] pci 0000:01:00.0: BAR 0 [mem 0x00000000-0x00003fff 64bit]
[    5.503464] [     T48] pci 0000:01:00.0: Upstream bridge's Max Payload Size set to 128 (was 256, max 256)
[    5.525959] [     T48] pci 0000:01:00.0: Max Payload Size set to 128 (was 128, max 128)
[    5.534845] [     T48] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    5.560448] [     T48] pci 0000:01:00.0: ASPM: default states L1
[    5.603416] [     T48] meson-pcie fc000000.pcie: error: wait linkup timeout
[    5.606141] [     T48] pci 0000:00:00.0: bridge window [mem 0xfc700000-0xfc7fffff]: assigned
[    5.636768] [     T48] pci 0000:00:00.0: ROM [mem 0xfc800000-0xfc80ffff pref]: assigned
[    5.636812] [     T48] pci 0000:01:00.0: BAR 0 [mem 0xfc700000-0xfc703fff 64bit]: assigned
[    5.693932] [     T48] meson-pcie fc000000.pcie: error: wait linkup timeout
[    5.735461] [     T48] meson-pcie fc000000.pcie: error: wait linkup timeout
[    5.778011] [     T48] meson-pcie fc000000.pcie: error: wait linkup timeout
[    5.820548] [     T48] meson-pcie fc000000.pcie: error: wait linkup timeout
[    5.821633] [     T48] pci 0000:01:00.0: BAR 0: error updating (0xfc700004 != 0xffffffff)
[    5.870950] [     T48] meson-pcie fc000000.pcie: error: wait linkup timeout
[    5.913471] [     T48] meson-pcie fc000000.pcie: error: wait linkup timeout
[    5.914547] [     T48] pci 0000:01:00.0: BAR 0: error updating (high 0x00000000 != 0xffffffff)
[    5.964337] [     T48] meson-pcie fc000000.pcie: error: wait linkup timeout
[    5.975124] [     T48] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    5.988201] [     T48] pci 0000:00:00.0:   bridge window [mem 0xfc700000-0xfc7fffff]
[    6.004583] [     T48] pci_bus 0000:00: resource 4 [io  0x0000-0xfffff]
[    6.018790] [     T48] pci_bus 0000:00: resource 5 [mem 0xfc700000-0xfdffffff]
[    6.032400] [     T48] pci_bus 0000:01: resource 1 [mem 0xfc700000-0xfc7fffff]
[    6.033164] [     T48] pcieport 0000:00:00.0: PME: Signaling with IRQ 24
[    6.045204] [     T48] pcieport 0000:00:00.0: AER: enabled with IRQ 24

# lspci -vv
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 24
         Bus: primary=00, secondary=01, subordinate=ff, sec-latency=0
         I/O behind bridge: [disabled] [16-bit]
         Memory behind bridge: fc700000-fc7fffff [size=1M] [32-bit]
         Prefetchable memory behind bridge: [disabled] [32-bit]
         Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
         Expansion ROM at fc800000 [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: 000000000935f000  Data: 0000
         Capabilities: [70] Express (v2) Root Port (Slot-), IntMsgNum 0
                 DevCap: MaxPayload 256 bytes, PhantFunc 0
                         ExtTag- RBE+ TEE-IO-
                 DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+
                         RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                         MaxPayload 128 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 L1 Enabled; RCB 64 bytes, LnkDisable- 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- ARIFwd-
                          AtomicOpsCtl: ReqEn- EgressBlck-
                          IDOReq- IDOCompl- LTR- EmergencyPowerReductionReq-
                          10BitTagReq- OBFF Disabled, EETLPPrefixBlk-
                 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- UncorrIntErr- BlockedTLP- AtomicOpBlocked- TLPBlockedErr-
                         PoisonTLPBlocked- DMWrReqBlocked- IDECheck- MisIDETLP- PCRC_CHECK- TLPXlatBlocked-
                 UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP-
                         ECRC- UnsupReq- ACSViol- UncorrIntErr+ BlockedTLP- AtomicOpBlocked- TLPBlockedErr-
                         PoisonTLPBlocked- DMWrReqBlocked- IDECheck- MisIDETLP- PCRC_CHECK- TLPXlatBlocked-
                 UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+
                         ECRC- UnsupReq- ACSViol- UncorrIntErr+ BlockedTLP- AtomicOpBlocked- TLPBlockedErr-
                         PoisonTLPBlocked- DMWrReqBlocked- IDECheck- MisIDETLP- PCRC_CHECK- TLPXlatBlocked-
                 CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr- CorrIntErr- HeaderOF-
                 CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ CorrIntErr+ HeaderOF+
                 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- IntMsgNum 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=18us
         Kernel driver in use: pcieport
         Kernel modules: shpchp

01:00.0 Network controller: Intel Corporation Wi-Fi 6E(802.11ax) AX210/AX1675* 2x2 [Typhoon Peak] (rev 1a)
         Subsystem: Intel Corporation Wi-Fi 6 AX210 160MHz
         !!! Unknown header type 7f
         Region 0: Memory at fc700000 (64-bit, non-prefetchable) [size=16K]
         Kernel modules: iwlwifi

Something else I tried was to boot with pcie_aspm.policy=performance so the link and device can be initialized, then

# echo default > /sys/module/pcie_aspm/parameters/policy

# while true; do cat /sys/kernel/debug/dwc_pcie_fc000000.pcie/ltssm_status; done | uniq
L1_IDLE (0x14)
RCVRY_LOCK (0x0d)
L1_IDLE (0x14)
RCVRY_IDLE (0x10)
L1_IDLE (0x14)
RCVRY_LOCK (0x0d)
L1_IDLE (0x14)
RCVRY_LOCK (0x0d)
L1_IDLE (0x14)
L0 (0x11)
L1_IDLE (0x14)
RCVRY_LOCK (0x0d)
L1_IDLE (0x14)
L0 (0x11)
L1_IDLE (0x14)
RCVRY_LOCK (0x0d)
L1_IDLE (0x14)
RCVRY_LOCK (0x0d)
L1_IDLE (0x14)
L0 (0x11)
L1_IDLE (0x14)
L0 (0x11)
L1_IDLE (0x14)
L0 (0x11)
L1_IDLE (0x14)
L0 (0x11)
L1_IDLE (0x14)
L123_SEND_EIDLE (0x13)
L1_IDLE (0x14)

The card works just fine. I'm thinking the ASPM issue is probably from the glue driver reporting the link to be down when it's really just in low power state.

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2025-10-31  5:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-23 11:33 Linnaea Lavia
2025-10-23 16:42 ` Bjorn Helgaas
2025-10-24  3:27   ` Linnaea Lavia
2025-10-27 12:51     ` FUKAUMI Naoki
2025-10-27 18:19       ` Linnaea Lavia
2025-10-28 22:16         ` Bjorn Helgaas
2025-10-29 10:50           ` Linnaea Lavia
2025-10-29 17:15             ` Bjorn Helgaas
2025-10-31  5:34               ` Linnaea Lavia [this message]
2025-10-31  8:50                 ` Neil Armstrong
2025-10-31 12:26                   ` Linnaea Lavia
2025-10-31 16:13                     ` Bjorn Helgaas
2025-10-31 17:47                       ` Manivannan Sadhasivam
2025-11-01  2:26                         ` Linnaea Lavia
2025-11-01  2:23                       ` Linnaea Lavia
2025-11-03  9:51                       ` Neil Armstrong
2025-10-30 22:34   ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM4PR05MB10270506AAC1FCE53C4915CC2C7F8A@DM4PR05MB10270.namprd05.prod.outlook.com \
    --to=linnaea-von-lavia@live.com \
    --cc=helgaas@kernel.org \
    --cc=khilman@baylibre.com \
    --cc=krishna.chundru@oss.qualcomm.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=naoki@radxa.com \
    --cc=neil.armstrong@linaro.org \
    --cc=regressions@lists.linux.dev \
    --cc=yue.wang@amlogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®