PCI/ASPM: Avoid L0s and L1 on Sophgo 2042/2044 PCIe Root Ports
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
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.
--- drivers/pci/quirks.c | 1 + include/linux/pci_ids.h | 2 ++ 2 files changed, 3 insertions(+)
drivers/pci/quirks.c +1 -0
@@ -2526,6 +2526,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ASMEDIA, 0x1080, quirk_disable_aspm_l0s_lDECLARE_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
@@ -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
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")Signed-off-by Inochi Amaoto <[email protected]>Tested-by Han Gao <[email protected]>
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@@ -2526,6 +2526,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ASMEDIA, 0x1080, quirk_disable_aspm_l0s_lDECLARE_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@@ -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
PATCH 2/2 PCI/ASPM: Avoid L0s and L1 on Sophgo 2044 PCIe [1f1c:2044] Root Ports
In reply to Inochi AmaotoSince 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.
--- drivers/pci/quirks.c | 1 + 1 file changed, 1 insertion(+)
drivers/pci/quirks.c +1 -0
@@ -2527,6 +2527,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, 0x0451, quirk_disable_aspm_l0sDECLARE_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
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 Portsdrivers/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
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 Portsdrivers/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
MAINTAINERSentry 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
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 Portsdrivers/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
MAINTAINERSentry 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
MAINTAINERSfile?
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
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
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 Portsdrivers/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
மணிவண்ணன் சதாசிவம்
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 Portsdrivers/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#n331Quirks 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