Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Linnaea Lavia <linnaea-von-lavia@live.com>
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: Tue, 28 Oct 2025 17:16:07 -0500	[thread overview]
Message-ID: <20251028221607.GA1533456@bhelgaas> (raw)
In-Reply-To: <DM4PR05MB102705BB2124288C68EEFDA04C7FCA@DM4PR05MB10270.namprd05.prod.outlook.com>

On Tue, Oct 28, 2025 at 02:19:13AM +0800, Linnaea Lavia wrote:

> On 6.18-rc3 with the change the link does not come up without pcie_aspm=off.

Thanks for testing this!

I think there are two problems:

  1) On v6.18-rc2, the meson-pcie probe failed with:

       meson-pcie fc000000.pcie: error -EBUSY: can't request region for resource [mem 0xfc000000-0xfc3fffff]

     so we didn't even try to bring up the link.  I think this was
     fixed in v6.18-rc3 by a1978b692a39 ("PCI: dwc: Use custom pci_ops
     for root bus DBI vs ECAM config access").

  2) On v6.18-rc3, we brought up the link and enumerated 01:00.0, but
     as soon as we tried to enable ASPM L1, the link stopped working:

> [    5.396341] [     T50] meson-pcie fc000000.pcie: host bridge /soc/pcie@fc000000 ranges:
> [    5.474722] [     T50] meson-pcie fc000000.pcie: error: wait linkup timeout
> [    5.480590] [     T50] meson-pcie fc000000.pcie: PCIe Gen.2 x1 link up
> [    5.484394] [     T50] meson-pcie fc000000.pcie: PCI host bridge to bus 0000:00
> [    5.511625] [     T50] pci 0000:00:00.0: [16c3:abcd] type 01 class 0x060400 PCIe Root Port
> [    5.578507] [     T50] pci 0000:01:00.0: [8086:2725] type 00 class 0x028000 PCIe Endpoint
> [    5.587460] [     T50] pci 0000:01:00.0: BAR 0 [mem 0x00000000-0x00003fff 64bit]
> [    5.656009] [     T50] pci 0000:01:00.0: ASPM: default states L1
> [    5.701063] [     T50] meson-pcie fc000000.pcie: error: wait linkup timeout
> [    5.724147] [     T50] pci 0000:01:00.0: BAR 0 [mem 0xfc700000-0xfc703fff 64bit]: assigned
> [    5.779528] [     T50] meson-pcie fc000000.pcie: error: wait linkup timeout
> [    5.822074] [     T50] meson-pcie fc000000.pcie: error: wait linkup timeout
> [    5.864902] [     T50] meson-pcie fc000000.pcie: error: wait linkup timeout
> [    5.907448] [     T50] meson-pcie fc000000.pcie: error: wait linkup timeout
> [    5.987517] [     T50] pci 0000:01:00.0: BAR 0: error updating (0xfc700004 != 0xffffffff)
> [    6.081421] [     T50] pci 0000:01:00.0: BAR 0: error updating (high 0x00000000 != 0xffffffff)

Can you try the patch below on top of v6.18-rc3?  It should prevent
enabling ASPM L1.  Can you also collect the output of "sudo lspci -vv"
on some working kernel?

I'm a little concerned that [16c3:abcd] is too general because it
looks like that ID has really been abused by vendors:
https://patchwork.kernel.org/patch/10798497/

I wonder if there's a way for meson-pcie to write a corrected
Vendor/Device ID in the Root Port so we could make a quirk that's
specific to the Meson controller.

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

  reply	other threads:[~2025-10-28 22:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-23 11:33 PCIe probe failure on AmLogic A311D after 6.18-rc1 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 [this message]
2025-10-29 10:50           ` Linnaea Lavia
2025-10-29 17:15             ` Bjorn Helgaas
2025-10-31  5:34               ` Linnaea Lavia
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=20251028221607.GA1533456@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=khilman@baylibre.com \
    --cc=krishna.chundru@oss.qualcomm.com \
    --cc=linnaea-von-lavia@live.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