aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/indirect_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/indirect_pci.c')
-rw-r--r--arch/powerpc/sysdev/indirect_pci.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c
index c7e6e859b393..bc5b4e22fa5d 100644
--- a/arch/powerpc/sysdev/indirect_pci.c
+++ b/arch/powerpc/sysdev/indirect_pci.c
@@ -35,10 +35,17 @@ indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
35 u8 cfg_type = 0; 35 u8 cfg_type = 0;
36 u32 bus_no, reg; 36 u32 bus_no, reg;
37 37
38 if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) {
39 if (bus->number != hose->first_busno)
40 return PCIBIOS_DEVICE_NOT_FOUND;
41 if (devfn != 0)
42 return PCIBIOS_DEVICE_NOT_FOUND;
43 }
44
38 if (ppc_md.pci_exclude_device) 45 if (ppc_md.pci_exclude_device)
39 if (ppc_md.pci_exclude_device(hose, bus->number, devfn)) 46 if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
40 return PCIBIOS_DEVICE_NOT_FOUND; 47 return PCIBIOS_DEVICE_NOT_FOUND;
41 48
42 if (hose->indirect_type & PPC_INDIRECT_TYPE_SET_CFG_TYPE) 49 if (hose->indirect_type & PPC_INDIRECT_TYPE_SET_CFG_TYPE)
43 if (bus->number != hose->first_busno) 50 if (bus->number != hose->first_busno)
44 cfg_type = 1; 51 cfg_type = 1;
@@ -83,6 +90,13 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
83 u8 cfg_type = 0; 90 u8 cfg_type = 0;
84 u32 bus_no, reg; 91 u32 bus_no, reg;
85 92
93 if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) {
94 if (bus->number != hose->first_busno)
95 return PCIBIOS_DEVICE_NOT_FOUND;
96 if (devfn != 0)
97 return PCIBIOS_DEVICE_NOT_FOUND;
98 }
99
86 if (ppc_md.pci_exclude_device) 100 if (ppc_md.pci_exclude_device)
87 if (ppc_md.pci_exclude_device(hose, bus->number, devfn)) 101 if (ppc_md.pci_exclude_device(hose, bus->number, devfn))
88 return PCIBIOS_DEVICE_NOT_FOUND; 102 return PCIBIOS_DEVICE_NOT_FOUND;