diff options
author | Jayachandran C <jchandra@broadcom.com> | 2013-01-14 10:11:58 -0500 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-02-16 18:15:20 -0500 |
commit | 8cd3d64c5714de7e17eccde48837b329f67bd85e (patch) | |
tree | 98a584e60cd4ec7fbaaebf04c85f2dc04b12e3bd | |
parent | 4e45e542cd742c1c3e30e7f252640644c66548b5 (diff) |
MIPS: PCI: Prevent hang on XLP reg read
Reading PCI extended register at 0x255 on a bridge will hang if there
is no device connected on the link. Make PCI read routine skip this
register.
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Patchwork: http://patchwork.linux-mips.org/patch/4789/
Signed-off-by: John Crispin <blogic@openwrt.org>
-rw-r--r-- | arch/mips/pci/pci-xlp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/mips/pci/pci-xlp.c b/arch/mips/pci/pci-xlp.c index 5077148bd67d..fbf001a068a4 100644 --- a/arch/mips/pci/pci-xlp.c +++ b/arch/mips/pci/pci-xlp.c | |||
@@ -64,8 +64,12 @@ static inline u32 pci_cfg_read_32bit(struct pci_bus *bus, unsigned int devfn, | |||
64 | u32 data; | 64 | u32 data; |
65 | u32 *cfgaddr; | 65 | u32 *cfgaddr; |
66 | 66 | ||
67 | where &= ~3; | ||
68 | if (bus->number == 0 && PCI_SLOT(devfn) == 1 && where == 0x954) | ||
69 | return 0xffffffff; | ||
70 | |||
67 | cfgaddr = (u32 *)(pci_config_base + | 71 | cfgaddr = (u32 *)(pci_config_base + |
68 | pci_cfg_addr(bus->number, devfn, where & ~3)); | 72 | pci_cfg_addr(bus->number, devfn, where)); |
69 | data = *cfgaddr; | 73 | data = *cfgaddr; |
70 | return data; | 74 | return data; |
71 | } | 75 | } |