Thread (9 messages) 9 messages, 1 author, 2017-09-25
STALE3211d REVIEWED: 2 (0M)
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 2/7] PCI: aardvark: set PIO_ADDR_LS correctly in advk_pcie_rd_conf()

From: Thomas Petazzoni <hidden>
Date: 2017-09-08 09:54:00
Also in: linux-pci, stable
Subsystem: pci subsystem, the rest · Maintainers: Bjorn Helgaas, Linus Torvalds

From: Victor Gu <redacted>

When setting the PIO_ADDR_LS register during a configuration read, we
were properly passing the device number, function number and register
number, but not the bus number, causing issues when reading the
configuration of PCIe devices.

Fixes: 8c39d710363c1 ("PCI: aardvark: Add Aardvark PCI host controller driver")
Cc: <redacted>
Signed-off-by: Victor Gu <redacted>
Reviewed-by: Wilson Ding <redacted>
Reviewed-by: Nadav Haklai <redacted>
[Thomas: tweak commit log.]
Signed-off-by: Thomas Petazzoni <redacted>
---
 drivers/pci/host/pci-aardvark.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/host/pci-aardvark.c b/drivers/pci/host/pci-aardvark.c
index 582d75f864e3..68ff10e17c74 100644
--- a/drivers/pci/host/pci-aardvark.c
+++ b/drivers/pci/host/pci-aardvark.c
@@ -460,7 +460,7 @@ static int advk_pcie_rd_conf(struct pci_bus *bus, u32 devfn,
 	advk_writel(pcie, reg, PIO_CTRL);
 
 	/* Program the address registers */
-	reg = PCIE_BDF(devfn) | PCIE_CONF_REG(where);
+	reg = PCIE_CONF_ADDR(bus->number, devfn, where);
 	advk_writel(pcie, reg, PIO_ADDR_LS);
 	advk_writel(pcie, 0, PIO_ADDR_MS);
 
-- 
2.13.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help