linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] PCI: Remove unsupported or incomplete PCIe Capabilities
@ 2025-11-10  6:59 Qiang Yu
  2025-11-10  6:59 ` [PATCH 1/5] PCI: Add preceding capability position support and update drivers Qiang Yu
                   ` (5 more replies)
  0 siblings, 6 replies; 27+ messages in thread
From: Qiang Yu @ 2025-11-10  6:59 UTC (permalink / raw)
  To: Lorenzo Pieralisi, Krzysztof Wilczyński,
	Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas, Jingoo Han
  Cc: linux-pci, linux-kernel, linux-arm-msm, Qiang Yu, Wenbin Yao

This patch series addresses issues where certain PCIe Standard or Extended
Capabilities are advertised by the controller, but not fully or at all
implemented in hardware. Exposing such capabilities to the PCI framework
can lead to unexpected or undefined behavior.

The series consists of two main parts:

1. Infrastructure patches (1-2): Add generic capability removal support
2. Platform-specific patches(3-5): Apply fixes for DWC based PCIe Root
   Ports and Qualcomm PCIe Root Ports

Patch 1 extends the existing PCI capability finding macros to optionally
return the position of the preceding capability. This information is
essential for capability removal operations, as it allows updating the
"next" pointer of the predecessor to skip over the capability being
removed.

Patch 2 introduces two new APIs in the DesignWare PCIe controller driver:
- dw_pcie_remove_capability() - Remove standard PCI capabilities
- dw_pcie_remove_ext_capability() - Remove extended PCI capabilities

Patch 3 implements automatic MSI/MSI-X capability removal for Root Ports
when using the iMSI-RX module as MSI controller. This addresses the issue
where iMSI-RX cannot generate MSI interrupts for Root Ports, forcing a
fallback to INTx interrupts for Root Ports.

Patch 4 removes MSI-X capability from Qualcomm Root Ports unconditionally.
On platforms like Glymur, MSI-X capability is exposed but lacks the
required Table and PBA structures, leading to SMMU faults when the
capability is used.

Patch 5 removes DPC (Downstream Port Containment) Extended Capability from
Qualcomm platforms. While the capability registers are present, DPC is not
fully supported, and exposing it can cause undefined behavior.

Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com>
---
Qiang Yu (5):
      PCI: Add preceding capability position support and update drivers
      PCI: dwc: Add new APIs to remove standard and extended Capability
      PCI: dwc: Remove MSI/MSIX capability if iMSI-RX is used as MSI controller
      PCI: qcom: Remove MSI-X Capability for Root Ports
      PCI: qcom: Remove DPC Extended Capability

 drivers/pci/controller/cadence/pcie-cadence.c     |  4 +-
 drivers/pci/controller/dwc/pcie-designware-ep.c   |  2 +-
 drivers/pci/controller/dwc/pcie-designware-host.c | 10 ++++
 drivers/pci/controller/dwc/pcie-designware.c      | 59 +++++++++++++++++++++--
 drivers/pci/controller/dwc/pcie-designware.h      |  2 +
 drivers/pci/controller/dwc/pcie-qcom.c            |  3 ++
 drivers/pci/pci.c                                 |  8 +--
 drivers/pci/pci.h                                 | 23 +++++++--
 8 files changed, 97 insertions(+), 14 deletions(-)
---
base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
change-id: 20251109-remove_cap-4b7c0600f766

Best regards,
-- 
Qiang Yu <qiang.yu@oss.qualcomm.com>


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

end of thread, other threads:[~2025-12-28  7:49 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-10  6:59 [PATCH 0/5] PCI: Remove unsupported or incomplete PCIe Capabilities Qiang Yu
2025-11-10  6:59 ` [PATCH 1/5] PCI: Add preceding capability position support and update drivers Qiang Yu
2025-11-10  6:59 ` [PATCH 2/5] PCI: dwc: Add new APIs to remove standard and extended Capability Qiang Yu
2025-12-23  7:24   ` Niklas Cassel
2025-12-24  6:20     ` Qiang Yu
2025-12-26 21:07   ` Bjorn Helgaas
2025-12-27  5:10     ` Manivannan Sadhasivam
2025-12-28  7:49     ` Qiang Yu
2025-11-10  6:59 ` [PATCH 3/5] PCI: dwc: Remove MSI/MSIX capability if iMSI-RX is used as MSI controller Qiang Yu
2025-11-20 11:18   ` Manivannan Sadhasivam
2025-11-20 14:06   ` Shawn Lin
2025-11-20 17:00     ` Manivannan Sadhasivam
2025-11-21  4:04       ` Shawn Lin
2025-11-21  7:56         ` Qiang Yu
2025-11-28  9:57         ` Qiang Yu
2025-11-28 10:02           ` Shawn Lin
2025-12-04  1:27           ` Brian Norris
2025-12-26 21:25       ` Bjorn Helgaas
2025-12-27  4:58         ` Manivannan Sadhasivam
2025-12-04  1:51   ` Brian Norris
2025-12-18  7:31     ` Manivannan Sadhasivam
2025-12-26 21:31   ` Bjorn Helgaas
2025-12-27  5:21     ` Manivannan Sadhasivam
2025-12-28  7:02       ` Qiang Yu
2025-11-10  6:59 ` [PATCH 4/5] PCI: qcom: Remove MSI-X Capability for Root Ports Qiang Yu
2025-11-10  6:59 ` [PATCH 5/5] PCI: qcom: Remove DPC Extended Capability Qiang Yu
2025-12-18  7:35 ` [PATCH 0/5] PCI: Remove unsupported or incomplete PCIe Capabilities Manivannan Sadhasivam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).