From d082d2f2c5fd7363ffb43c522719a61722a92ede Mon Sep 17 00:00:00 2001 From: jmallett Date: Thu, 1 Nov 2012 20:39:39 +0000 Subject: Don't disable PCIe just because the host is not a PCI host; the latter flag only applies to non-PCIe systems. If PCIe is in target mode, it will simply and gracefully fail to attach of its own accord. --- sys/mips/cavium/octopci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/mips/cavium') diff --git a/sys/mips/cavium/octopci.c b/sys/mips/cavium/octopci.c index bcf19b80..ae92063 100644 --- a/sys/mips/cavium/octopci.c +++ b/sys/mips/cavium/octopci.c @@ -104,10 +104,6 @@ static uint64_t octopci_cs_addr(unsigned, unsigned, unsigned, unsigned); static void octopci_identify(driver_t *drv, device_t parent) { - /* Check whether we are a PCI host. */ - if ((cvmx_sysinfo_get()->bootloader_config_flags & CVMX_BOOTINFO_CFG_FLAG_PCI_HOST) == 0) - return; - BUS_ADD_CHILD(parent, 0, "pcib", 0); if (octeon_has_feature(OCTEON_FEATURE_PCIE)) BUS_ADD_CHILD(parent, 0, "pcib", 1); @@ -121,6 +117,10 @@ octopci_probe(device_t dev) return (0); } + /* Check whether we are a PCI host. */ + if ((cvmx_sysinfo_get()->bootloader_config_flags & CVMX_BOOTINFO_CFG_FLAG_PCI_HOST) == 0) + return (ENXIO); + if (device_get_unit(dev) != 0) return (ENXIO); -- cgit v1.1