Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH v2] pci: loongson: Avoid L0s on LS7A1000 PCIe x8 [0014:7a29] Root Ports rev2
@ 2026-06-23 17:36 Xi Ruoyao
  2026-06-23 17:44 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Xi Ruoyao @ 2026-06-23 17:36 UTC (permalink / raw)
  To: Bjorn Helgaas, Manivannan Sadhasivam
  Cc: Huacai Chen, Lorenzo Pieralisi, Krzysztof Wilczyński,
	Rob Herring, linux-pci, linux-kernel, Xi Ruoyao, Mingcong Bai,
	Henry Chen, Han Gao, Jiaxun Yang

Commit f3ac2ff14834 ("PCI/ASPM: Enable all ClockPM and ASPM states for
devicetree platforms") has broke booting of a Loongson 3B4000 + 7A1000
server with an Intel 750 Series SSD.  We also found a Loongson 3A5000
board using the same 7A1000 bridge chip exhibiting the same issue with
pcie_aspm=force and pcie_aspm.policy=powersave (ASPM is not enabled by
default on the 3A5000 board because it's based on ACPI and the _OSC
method has not been implemented in its DSDT/SSDT yet).

This seems only affecting the 7A1000 chips shipping the revision 2 of
the PCIe x8 Root Port: on other two boards with a (persumably older)
LS7A1000 bridge chip utilizing the revision 1 of the root port, the
issue does not reproduce.

Cc: Mingcong Bai <jeffbai@aosc.io>
Cc: Henry Chen <chenx97@aosc.io>
Cc: Han Gao <gaohan@iscas.ac.cn>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Fixes: f3ac2ff14834 ("PCI/ASPM: Enable all ClockPM and ASPM states for devicetree platforms")
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
---

Changes from v1: rename the quirk function into a style similar to other
quirk functions in the same file.

 drivers/pci/controller/pci-loongson.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/pci/controller/pci-loongson.c b/drivers/pci/controller/pci-loongson.c
index a4250d7af1bf..235b44859b53 100644
--- a/drivers/pci/controller/pci-loongson.c
+++ b/drivers/pci/controller/pci-loongson.c
@@ -212,6 +212,19 @@ static void loongson_pci_bridge_speed_quirk(struct pci_dev *pdev)
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_LOONGSON, 0x3c19, loongson_pci_bridge_speed_quirk);
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_LOONGSON, 0x3c29, loongson_pci_bridge_speed_quirk);
 
+/*
+ * Some devices, for example Intel 750 Series SSD, experiences data loss
+ * (read timeout) on LS7A1000 PCIe x8 Root Port when ASPM L0s is enabled.
+ * This seems only affecting the revision 2.
+ */
+static void loongson_port2_aspm_quirk(struct pci_dev *pdev)
+{
+	if (pdev->revision == 2)
+		pcie_aspm_remove_cap(pdev, PCI_EXP_LNKCAP_ASPM_L0S);
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_LOONGSON, DEV_LS7A_PCIE_PORT2,
+			 loongson_port2_aspm_quirk);
+
 static struct loongson_pci *pci_bus_to_loongson_pci(struct pci_bus *bus)
 {
 	struct pci_config_window *cfg;
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] pci: loongson: Avoid L0s on LS7A1000 PCIe x8 [0014:7a29] Root Ports rev2
  2026-06-23 17:36 [PATCH v2] pci: loongson: Avoid L0s on LS7A1000 PCIe x8 [0014:7a29] Root Ports rev2 Xi Ruoyao
@ 2026-06-23 17:44 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-06-23 17:44 UTC (permalink / raw)
  To: Xi Ruoyao; +Cc: linux-pci

> Commit f3ac2ff14834 ("PCI/ASPM: Enable all ClockPM and ASPM states for
> devicetree platforms") has broke booting of a Loongson 3B4000 + 7A1000
> server with an Intel 750 Series SSD.  We also found a Loongson 3A5000
> board using the same 7A1000 bridge chip exhibiting the same issue with
> pcie_aspm=force and pcie_aspm.policy=powersave (ASPM is not enabled by
> default on the 3A5000 board because it's based on ACPI and the _OSC
> method has not been implemented in its DSDT/SSDT yet).
> 
> This seems only affecting the 7A1000 chips shipping the revision 2 of
> the PCIe x8 Root Port: on other two boards with a (persumably older)
> LS7A1000 bridge chip utilizing the revision 1 of the root port, the
> issue does not reproduce.
> 
> Cc: Mingcong Bai <jeffbai@aosc.io>
> Cc: Henry Chen <chenx97@aosc.io>
> Cc: Han Gao <gaohan@iscas.ac.cn>
> Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
> Fixes: f3ac2ff14834 ("PCI/ASPM: Enable all ClockPM and ASPM states for devicetree platforms")
> Signed-off-by: Xi Ruoyao <xry111@xry111.site>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260623173648.222922-1-xry111@xry111.site?part=1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-23 17:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-23 17:36 [PATCH v2] pci: loongson: Avoid L0s on LS7A1000 PCIe x8 [0014:7a29] Root Ports rev2 Xi Ruoyao
2026-06-23 17:44 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox