Skip to content

Commit 085a68d

Browse files
apmswbjorn-helgaas
authored andcommitted
PCI: xgene: Add register offset to config space base address
In xgene_pcie_map_bus(), we neglected to add in the register offset when calculating the config space address. This means all config accesses operated on the first four bytes of config space. Add the register offset to the config space base address. Also correct the xgene_pcie_map_bus() prototype to fix a compiler warning. [bhelgaas: changelog] Fixes: 350f8be ("PCI: xgene: Convert to use generic config accessors") Posting: http://lkml.kernel.org/r/1424214840-26498-1-git-send-email-fkan@apm.com Signed-off-by: Feng Kan <fkan@apm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Tanmay Inamdar <tinamdar@apm.com> Acked-by: Rob Herring <robh@kernel.org>
1 parent 4efe874 commit 085a68d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/host/pci-xgene.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static bool xgene_pcie_hide_rc_bars(struct pci_bus *bus, int offset)
127127
return false;
128128
}
129129

130-
static int xgene_pcie_map_bus(struct pci_bus *bus, unsigned int devfn,
130+
static void __iomem *xgene_pcie_map_bus(struct pci_bus *bus, unsigned int devfn,
131131
int offset)
132132
{
133133
struct xgene_pcie_port *port = bus->sysdata;
@@ -137,7 +137,7 @@ static int xgene_pcie_map_bus(struct pci_bus *bus, unsigned int devfn,
137137
return NULL;
138138

139139
xgene_pcie_set_rtdid_reg(bus, devfn);
140-
return xgene_pcie_get_cfg_base(bus);
140+
return xgene_pcie_get_cfg_base(bus) + offset;
141141
}
142142

143143
static struct pci_ops xgene_pcie_ops = {

0 commit comments

Comments
 (0)