Skip to contentSkip to conversation

PCI/ASPM: Avoid L0s and L1 on Sophgo 2042/2044 PCIe Root Ports

PATCH In review Inochi Amaoto 4 participants 10 messages Dec 25, 2025 – Dec 30, 2025 PCI

lore
Share & tools
lore
#0 lore raw

cover PCI/ASPM: Avoid L0s and L1 on Sophgo 2042/2044 PCIe Root Ports

Since commit f3ac2ff14834 ("PCI/ASPM: Enable all ClockPM and ASPM states for devicetree platforms") force enable ASPM on all device tree platform, the SG2042/SG2044 PCIe Root Ports breaks as it advertises L0s and L1 capabilities without supporting it.

Override the L0s and L1 Support advertised in Link Capabilities by the SG2042/SG2044 Root Ports so we don't try to enable those states.

Inochi Amaoto (2):
PCI/ASPM: Avoid L0s and L1 on Sophgo 2042 PCIe [1f1c:2042] Root Ports PCI/ASPM: Avoid L0s and L1 on Sophgo 2044 PCIe [1f1c:2044] Root Ports

 drivers/pci/quirks.c    | 2 ++
 include/linux/pci_ids.h | 2 ++
 2 files changed, 4 insertions(+)

--
2.52.0

#1 lore raw

PATCH 1/2 PCI/ASPM: Avoid L0s and L1 on Sophgo 2042 PCIe [1f1c:2042] Root Ports

Since commit f3ac2ff14834 ("PCI/ASPM: Enable all ClockPM and ASPM states for devicetree platforms") force enable ASPM on all device tree platform, the SG2042 root port breaks as it advertises L0s and L1 capabilities without supporting it.

Override the L0s and L1 Support advertised in Link Capabilities by the SG2042 Root Ports ([1f1c:2042]), so we don't try to enable those states.

Fixes 4e27aca4881a ("riscv: sophgo: dts: add PCIe controllers for SG2042")
---
 drivers/pci/quirks.c    | 1 +
 include/linux/pci_ids.h | 2 ++
 2 files changed, 3 insertions(+)
drivers/pci/quirks.c +1 -0
index b9c252aa6fe0..d775ff567d1b 100644
@@ -2526,6 +2526,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ASMEDIA, 0x1080, quirk_disable_aspm_l0s_l
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, 0x0451, quirk_disable_aspm_l0s_l1);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PASEMI, 0xa002, quirk_disable_aspm_l0s_l1);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HUAWEI, 0x1105, quirk_disable_aspm_l0s_l1);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SOPHGO, 0x2042, quirk_disable_aspm_l0s_l1);
 
 /*
  * Some Pericom PCIe-to-PCI bridges in reverse mode need the PCIe Retrain
include/linux/pci_ids.h +2 -0
index a9a089566b7c..78638cbf2780 100644
@@ -2631,6 +2631,8 @@
 
 #define PCI_VENDOR_ID_CXL		0x1e98
 
+#define PCI_VENDOR_ID_SOPHGO		0x1f1c
+
 #define PCI_VENDOR_ID_TEHUTI		0x1fc9
 #define PCI_DEVICE_ID_TEHUTI_3009	0x3009
 #define PCI_DEVICE_ID_TEHUTI_3010	0x3010
Signature · 1 line
2.52.0
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] PCI/ASPM: Avoid L0s and L1 on Sophgo 2042 PCIe [1f1c:2042] Root Ports

Quoted 11 lines · Inochi Amaoto

Since commit f3ac2ff14834 ("PCI/ASPM: Enable all ClockPM and ASPM states for devicetree platforms") force enable ASPM on all device tree platform, the SG2042 root port breaks as it advertises L0s and L1 capabilities without supporting it.

Override the L0s and L1 Support advertised in Link Capabilities by the SG2042 Root Ports ([1f1c:2042]), so we don't try to enable those states.

Fixes 4e27aca4881a ("riscv: sophgo: dts: add PCIe controllers for SG2042")

Thanks,

Chen

Quoted 30 lines
---
  drivers/pci/quirks.c    | 1 +
  include/linux/pci_ids.h | 2 ++
  2 files changed, 3 insertions(+)
drivers/pci/quirks.c +1 -0
index b9c252aa6fe0..d775ff567d1b 100644
@@ -2526,6 +2526,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ASMEDIA, 0x1080, quirk_disable_aspm_l0s_l
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, 0x0451, quirk_disable_aspm_l0s_l1);
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PASEMI, 0xa002, quirk_disable_aspm_l0s_l1);
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HUAWEI, 0x1105, quirk_disable_aspm_l0s_l1);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SOPHGO, 0x2042, quirk_disable_aspm_l0s_l1);
 
  /*
   * Some Pericom PCIe-to-PCI bridges in reverse mode need the PCIe Retrain
include/linux/pci_ids.h +2 -0
index a9a089566b7c..78638cbf2780 100644
@@ -2631,6 +2631,8 @@
 
  #define PCI_VENDOR_ID_CXL		0x1e98
 
+#define PCI_VENDOR_ID_SOPHGO		0x1f1c
+
  #define PCI_VENDOR_ID_TEHUTI		0x1fc9
  #define PCI_DEVICE_ID_TEHUTI_3009	0x3009
  #define PCI_DEVICE_ID_TEHUTI_3010	0x3010
#3 lore raw

PATCH 2/2 PCI/ASPM: Avoid L0s and L1 on Sophgo 2044 PCIe [1f1c:2044] Root Ports

In reply to Inochi Amaoto

Since commit f3ac2ff14834 ("PCI/ASPM: Enable all ClockPM and ASPM states for devicetree platforms") force enable ASPM on all device tree platform, the SG2044 root port breaks as it advertises L0s and L1 capabilities without supporting it.

Override the L0s and L1 Support advertised in Link Capabilities by the SG2044 Root Ports ([1f1c:2044]), so we don't try to enable those states.

Fixes 3309df45e6b5 ("riscv: dts: sophgo: sg2044: add PCIe device support for SG2044")
---
 drivers/pci/quirks.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pci/quirks.c +1 -0
index d775ff567d1b..855e74203ca9 100644
@@ -2527,6 +2527,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, 0x0451, quirk_disable_aspm_l0s
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PASEMI, 0xa002, quirk_disable_aspm_l0s_l1);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HUAWEI, 0x1105, quirk_disable_aspm_l0s_l1);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SOPHGO, 0x2042, quirk_disable_aspm_l0s_l1);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SOPHGO, 0x2044, quirk_disable_aspm_l0s_l1);
 
 /*
  * Some Pericom PCIe-to-PCI bridges in reverse mode need the PCIe Retrain
Signature · 1 line
2.52.0
#4 lore raw
In reply to Inochi Amaoto
Quoted 8 lines · Inochi Amaoto

Since commit f3ac2ff14834 ("PCI/ASPM: Enable all ClockPM and ASPM states for devicetree platforms") force enable ASPM on all device tree platform, the SG2042/SG2044 PCIe Root Ports breaks as it advertises L0s and L1 capabilities without supporting it.

Override the L0s and L1 Support advertised in Link Capabilities by the SG2042/SG2044 Root Ports so we don't try to enable those states.

Quoted 7 lines

Inochi Amaoto (2):
PCI/ASPM: Avoid L0s and L1 on Sophgo 2042 PCIe [1f1c:2042] Root Ports PCI/ASPM: Avoid L0s and L1 on Sophgo 2044 PCIe [1f1c:2044] Root Ports

 drivers/pci/quirks.c    | 2 ++
 include/linux/pci_ids.h | 2 ++
 2 files changed, 4 insertions(+)

1) Can somebody at Sophgo confirm that this is a hardware erratum? I just want to make rule out some kind of OS bug in configuring L0s/L1.

2) Why don't we have a MAINTAINERS entry for this driver? I failed to notice that the series we applied
(https://lore.kernel.org/all/[email protected]/)
does not include a maintainer. Chen, since you posted that series, are you willing to sign up to maintain it?

Bjorn

#5 lore raw
Quoted 16 lines · Bjorn Helgaas
Quoted 8 lines · Inochi Amaoto

Since commit f3ac2ff14834 ("PCI/ASPM: Enable all ClockPM and ASPM states for devicetree platforms") force enable ASPM on all device tree platform, the SG2042/SG2044 PCIe Root Ports breaks as it advertises L0s and L1 capabilities without supporting it.

Override the L0s and L1 Support advertised in Link Capabilities by the SG2042/SG2044 Root Ports so we don't try to enable those states.

Quoted 7 lines

Inochi Amaoto (2):
PCI/ASPM: Avoid L0s and L1 on Sophgo 2042 PCIe [1f1c:2042] Root Ports PCI/ASPM: Avoid L0s and L1 on Sophgo 2044 PCIe [1f1c:2044] Root Ports

  drivers/pci/quirks.c    | 2 ++
  include/linux/pci_ids.h | 2 ++
  2 files changed, 4 insertions(+)
Quoted 8 lines

1) Can somebody at Sophgo confirm that this is a hardware erratum? I just want to make rule out some kind of OS bug in configuring L0s/L1.

2) Why don't we have a MAINTAINERS entry for this driver? I failed to notice that the series we applied
(https://lore.kernel.org/all/[email protected]/)
does not include a maintainer. Chen, since you posted that series, are you willing to sign up to maintain it?

Sorry, I didn't realize I needed to submit maintainer information separately for each driver when I submitted the PCIe driver code.

Yes, I will be maintaining the SG2042 PCIe driver. Do I need to add an entry to the MAINTAINERS file?

Chen

Quoted 2 lines

Bjorn

#6 lore raw
Quoted 25 lines · Chen Wang
Quoted 16 lines · Bjorn Helgaas
Quoted 15 lines · Inochi Amaoto

Since commit f3ac2ff14834 ("PCI/ASPM: Enable all ClockPM and ASPM states for devicetree platforms") force enable ASPM on all device tree platform, the SG2042/SG2044 PCIe Root Ports breaks as it advertises L0s and L1 capabilities without supporting it.

Override the L0s and L1 Support advertised in Link Capabilities by the SG2042/SG2044 Root Ports so we don't try to enable those states.

Inochi Amaoto (2):
PCI/ASPM: Avoid L0s and L1 on Sophgo 2042 PCIe [1f1c:2042] Root Ports PCI/ASPM: Avoid L0s and L1 on Sophgo 2044 PCIe [1f1c:2044] Root Ports

  drivers/pci/quirks.c    | 2 ++
  include/linux/pci_ids.h | 2 ++
  2 files changed, 4 insertions(+)

...

Quoted 5 lines

2) Why don't we have a MAINTAINERS entry for this driver? I failed to notice that the series we applied
(https://lore.kernel.org/all/[email protected]/)
does not include a maintainer. Chen, since you posted that series, are you willing to sign up to maintain it?

Quoted 5 lines

Sorry, I didn't realize I needed to submit maintainer information separately for each driver when I submitted the PCIe driver code.

Yes, I will be maintaining the SG2042 PCIe driver. Do I need to add an entry to the MAINTAINERS file?

Yes, please.

  $ ./scripts/get_maintainer.pl drivers/pci/controller/cadence/pcie-sg2042.c
  Lorenzo Pieralisi <[email protected]> (maintainer:PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS)
  "Krzysztof Wilczyński" <[email protected]> (maintainer:PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS)
  Manivannan Sadhasivam <[email protected]> (maintainer:PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS,commit_signer:2/2=100%)
  ...
  Chen Wang <[email protected]> (commit_signer:2/2=100%,authored:1/2=50%,added_lines:134/134=100%)

This does list you, but only as a commit signer. It should list you as a maintainer of the driver so people know to send patches to you (and cc linux-pci, of course).

Bjorn

#7 lore raw
In reply to Bjorn Helgaas
Quoted 13 lines · Bjorn Helgaas
Quoted 12 lines · Inochi Amaoto

Since commit f3ac2ff14834 ("PCI/ASPM: Enable all ClockPM and ASPM states for devicetree platforms") force enable ASPM on all device tree platform, the SG2042/SG2044 PCIe Root Ports breaks as it advertises L0s and L1 capabilities without supporting it.

Override the L0s and L1 Support advertised in Link Capabilities by the SG2042/SG2044 Root Ports so we don't try to enable those states.

Inochi Amaoto (2):
PCI/ASPM: Avoid L0s and L1 on Sophgo 2042 PCIe [1f1c:2042] Root Ports PCI/ASPM: Avoid L0s and L1 on Sophgo 2044 PCIe [1f1c:2044] Root Ports

Quoted 7 lines
Quoted 3 lines
 drivers/pci/quirks.c    | 2 ++
 include/linux/pci_ids.h | 2 ++
 2 files changed, 4 insertions(+)

1) Can somebody at Sophgo confirm that this is a hardware erratum? I just want to make rule out some kind of OS bug in configuring L0s/L1.

Hi Bjorn,

I have asked for the Sophgo staff, and they already confirmed this hardware errata.

Regards,
Inochi

#8 lore raw
Quoted 18 lines · Inochi Amaoto
Quoted 17 lines · Bjorn Helgaas
Quoted 15 lines · Inochi Amaoto

Since commit f3ac2ff14834 ("PCI/ASPM: Enable all ClockPM and ASPM states for devicetree platforms") force enable ASPM on all device tree platform, the SG2042/SG2044 PCIe Root Ports breaks as it advertises L0s and L1 capabilities without supporting it.

Override the L0s and L1 Support advertised in Link Capabilities by the SG2042/SG2044 Root Ports so we don't try to enable those states.

Inochi Amaoto (2):
PCI/ASPM: Avoid L0s and L1 on Sophgo 2042 PCIe [1f1c:2042] Root Ports PCI/ASPM: Avoid L0s and L1 on Sophgo 2044 PCIe [1f1c:2044] Root Ports

 drivers/pci/quirks.c    | 2 ++
 include/linux/pci_ids.h | 2 ++
 2 files changed, 4 insertions(+)
Quoted 9 lines
Quoted 3 lines

1) Can somebody at Sophgo confirm that this is a hardware erratum? I just want to make rule out some kind of OS bug in configuring L0s/L1.

Hi Bjorn,

I have asked for the Sophgo staff, and they already confirmed this hardware errata.

Okay. If the hardware (Root Port) doesn't support L0s and L1, you should disable
the capability in the sophgo controller driver instead. You can use this as a
reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/controller/dwc/pcie-qcom.c#n331

Quirks is mostly meant for PCI endpoint devices (sometimes Root Ports also if there is no host controller driver).

- Mani

Signature · 1 line
மணிவண்ணன் சதாசிவம்
#9 lore raw
Quoted 29 lines · Manivannan Sadhasivam
Quoted 18 lines · Inochi Amaoto
Quoted 17 lines · Bjorn Helgaas
Quoted 15 lines · Inochi Amaoto

Since commit f3ac2ff14834 ("PCI/ASPM: Enable all ClockPM and ASPM states for devicetree platforms") force enable ASPM on all device tree platform, the SG2042/SG2044 PCIe Root Ports breaks as it advertises L0s and L1 capabilities without supporting it.

Override the L0s and L1 Support advertised in Link Capabilities by the SG2042/SG2044 Root Ports so we don't try to enable those states.

Inochi Amaoto (2):
PCI/ASPM: Avoid L0s and L1 on Sophgo 2042 PCIe [1f1c:2042] Root Ports PCI/ASPM: Avoid L0s and L1 on Sophgo 2044 PCIe [1f1c:2044] Root Ports

 drivers/pci/quirks.c    | 2 ++
 include/linux/pci_ids.h | 2 ++
 2 files changed, 4 insertions(+)
Quoted 9 lines
Quoted 3 lines

1) Can somebody at Sophgo confirm that this is a hardware erratum? I just want to make rule out some kind of OS bug in configuring L0s/L1.

Hi Bjorn,

I have asked for the Sophgo staff, and they already confirmed this hardware errata.

Quoted 9 lines

Okay. If the hardware (Root Port) doesn't support L0s and L1, you should disable
the capability in the sophgo controller driver instead. You can use this as a
reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/controller/dwc/pcie-qcom.c#n331

Quirks is mostly meant for PCI endpoint devices (sometimes Root Ports also if there is no host controller driver).

- Mani

Good to know, I will switch to quirks, thanks.

Regards,
Inochi