summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorraj <raj@FreeBSD.org>2009-01-09 12:38:41 +0000
committerraj <raj@FreeBSD.org>2009-01-09 12:38:41 +0000
commitaa56a975c17dac5562552bb238277fd96c124da2 (patch)
treea278815d6b12a2554f0b255cdc587beb487689b0 /sys
parentb57ad9857ef69dc51d61f6167363313a8fe8e59f (diff)
downloadFreeBSD-src-aa56a975c17dac5562552bb238277fd96c124da2.zip
FreeBSD-src-aa56a975c17dac5562552bb238277fd96c124da2.tar.gz
Check PCIE link status before accessing the bus.
Some 88F5182-based systems (Linkstation) have problems when PCIE is accessed without any peripherals present.
Diffstat (limited to 'sys')
-rw-r--r--sys/arm/mv/mv_pci.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/arm/mv/mv_pci.c b/sys/arm/mv/mv_pci.c
index 0c893bfd..61a64a1 100644
--- a/sys/arm/mv/mv_pci.c
+++ b/sys/arm/mv/mv_pci.c
@@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$");
#define PCIE_REG_STATUS 0x1A04
#define PCIE_REG_IRQ_MASK 0x1910
+#define STATUS_LINK_DOWN 1
#define STATUS_BUS_OFFS 8
#define STATUS_BUS_MASK (0xFF << STATUS_BUS_OFFS)
#define STATUS_DEV_OFFS 16
@@ -436,6 +437,8 @@ pcib_mbus_probe(device_t self)
P2P_CONF_DEV_OFFS;
} else {
val = bus_space_read_4(sc->sc_bst, sc->sc_bsh, PCIE_REG_STATUS);
+ if (val & STATUS_LINK_DOWN)
+ goto out;
bus = sc->sc_busnr = (val & STATUS_BUS_MASK) >> STATUS_BUS_OFFS;
dev = sc->sc_devnr = (val & STATUS_DEV_MASK) >> STATUS_DEV_OFFS;
}
OpenPOWER on IntegriCloud