Skip to content

Commit

Permalink
MIPS: PCI: Prevent hang on XLP reg read
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jayachandran C authored and John Crispin committed Feb 16, 2013
1 parent 4e45e54 commit 8cd3d64
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/mips/pci/pci-xlp.c
Original file line number Diff line number Diff line change
@@ -64,8 +64,12 @@ static inline u32 pci_cfg_read_32bit(struct pci_bus *bus, unsigned int devfn,
u32 data;
u32 *cfgaddr;

where &= ~3;
if (bus->number == 0 && PCI_SLOT(devfn) == 1 && where == 0x954)
return 0xffffffff;

cfgaddr = (u32 *)(pci_config_base +
pci_cfg_addr(bus->number, devfn, where & ~3));
pci_cfg_addr(bus->number, devfn, where));
data = *cfgaddr;
return data;
}

0 comments on commit 8cd3d64

Please sign in to comment.