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.
This commit is contained in:
parent
ff4d595304
commit
405b925e39
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=242454
@ -104,10 +104,6 @@ static uint64_t octopci_cs_addr(unsigned, unsigned, unsigned, unsigned);
|
|||||||
static void
|
static void
|
||||||
octopci_identify(driver_t *drv, device_t parent)
|
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);
|
BUS_ADD_CHILD(parent, 0, "pcib", 0);
|
||||||
if (octeon_has_feature(OCTEON_FEATURE_PCIE))
|
if (octeon_has_feature(OCTEON_FEATURE_PCIE))
|
||||||
BUS_ADD_CHILD(parent, 0, "pcib", 1);
|
BUS_ADD_CHILD(parent, 0, "pcib", 1);
|
||||||
@ -121,6 +117,10 @@ octopci_probe(device_t dev)
|
|||||||
return (0);
|
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)
|
if (device_get_unit(dev) != 0)
|
||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user