]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: dwc: Use custom pci_ops for root bus DBI vs ECAM config access
authorKrishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Fri, 17 Oct 2025 11:40:53 +0000 (17:10 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 20 Oct 2025 15:31:54 +0000 (10:31 -0500)
commita1978b692a3953241842a89eaa0026158f306cf1
tree6800a80644e0e90757924fab4ad33b0b01a5a5e4
parent3a8660878839faadb4f1a6dd72c3179c1df56787
PCI: dwc: Use custom pci_ops for root bus DBI vs ECAM config access

When the vendor configuration space is 256MB aligned, the DesignWare PCIe
host driver enables ECAM access and sets the DBI base to the start of the
config space. This causes vendor drivers to incorrectly program iATU
regions, as they rely on the DBI address for internal accesses.

To fix this, avoid overwriting the DBI base when ECAM is enabled.  Instead,
introduce a custom pci_ops that accesses the DBI region directly for the
root bus and uses ECAM for other buses.

Fixes: f6fd357f7afb ("PCI: dwc: Prepare the driver for enabling ECAM mechanism using iATU 'CFG Shift Feature'")
Reported-by: Ron Economos <re@w6rz.net>
Closes: https://lore.kernel.org/all/eac81c57-1164-4d74-a1b4-6f353c577731@w6rz.net/
Suggested-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
[bhelgaas: commit log]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Ron Economos <re@w6rz.net>
Link: https://patch.msgid.link/20251017-ecam_fix-v1-1-f6faa3d0edf3@oss.qualcomm.com
drivers/pci/controller/dwc/pcie-designware-host.c