diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-07-11 14:22:41 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-07-23 11:27:07 -0400 |
commit | 62c66c8e55fae40d93d8f79d60e2ed50379e46f9 (patch) | |
tree | 036850e5b65d37be7586ab0ac17f8f54dc5af567 /arch/powerpc/sysdev | |
parent | 38805e5f096162867a70c7468c654d7f9bb507da (diff) |
[POWERPC] Added indirect quirk to handle PCIe PHB that have issue w/no link
Added PPC_INDIRECT_TYPE_NO_PCIE_LINK flag to the indirect pci handling
code to ensure that we don't talk to any device other than the PHB
if we don't have PCIe link. Some controllers will lockup if they try
to do a config cycle to any device on the bus except the PHB.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/indirect_pci.c | 16 |
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; |