mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 10:29:15 +00:00
If we have found pci devices via pci_cfgopen(), but don't find a
host->pci bridge specifically, then add a pcib0 device on the motherboard for the pci bus to hang off. Requested by: Anders Andersson <anders@sanyusan.se> Obtained from: dfr
This commit is contained in:
parent
1c01270e7a
commit
cde35e1a3d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53363
@ -420,6 +420,7 @@ static void
|
||||
nexus_pcib_identify(driver_t *driver, device_t parent)
|
||||
{
|
||||
pcicfgregs probe;
|
||||
int found = 0;
|
||||
|
||||
if (pci_cfgopen() == 0)
|
||||
return;
|
||||
@ -455,9 +456,22 @@ nexus_pcib_identify(driver_t *driver, device_t parent)
|
||||
child = BUS_ADD_CHILD(parent, 100,
|
||||
"pcib", busnum);
|
||||
device_set_desc(child, s);
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure we add at least one bridge since some old
|
||||
* hardware doesn't actually have a host-pci bridge device.
|
||||
* Note that pci_cfgopen() thinks we have PCI devices..
|
||||
*/
|
||||
if (!found) {
|
||||
if (bootverbose)
|
||||
printf(
|
||||
"nexus_pcib_identify: no bridge found, adding pcib0 anyway\n");
|
||||
BUS_ADD_CHILD(parent, 100, "pcib", 0);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -420,6 +420,7 @@ static void
|
||||
nexus_pcib_identify(driver_t *driver, device_t parent)
|
||||
{
|
||||
pcicfgregs probe;
|
||||
int found = 0;
|
||||
|
||||
if (pci_cfgopen() == 0)
|
||||
return;
|
||||
@ -455,9 +456,22 @@ nexus_pcib_identify(driver_t *driver, device_t parent)
|
||||
child = BUS_ADD_CHILD(parent, 100,
|
||||
"pcib", busnum);
|
||||
device_set_desc(child, s);
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure we add at least one bridge since some old
|
||||
* hardware doesn't actually have a host-pci bridge device.
|
||||
* Note that pci_cfgopen() thinks we have PCI devices..
|
||||
*/
|
||||
if (!found) {
|
||||
if (bootverbose)
|
||||
printf(
|
||||
"nexus_pcib_identify: no bridge found, adding pcib0 anyway\n");
|
||||
BUS_ADD_CHILD(parent, 100, "pcib", 0);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -420,6 +420,7 @@ static void
|
||||
nexus_pcib_identify(driver_t *driver, device_t parent)
|
||||
{
|
||||
pcicfgregs probe;
|
||||
int found = 0;
|
||||
|
||||
if (pci_cfgopen() == 0)
|
||||
return;
|
||||
@ -455,9 +456,22 @@ nexus_pcib_identify(driver_t *driver, device_t parent)
|
||||
child = BUS_ADD_CHILD(parent, 100,
|
||||
"pcib", busnum);
|
||||
device_set_desc(child, s);
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure we add at least one bridge since some old
|
||||
* hardware doesn't actually have a host-pci bridge device.
|
||||
* Note that pci_cfgopen() thinks we have PCI devices..
|
||||
*/
|
||||
if (!found) {
|
||||
if (bootverbose)
|
||||
printf(
|
||||
"nexus_pcib_identify: no bridge found, adding pcib0 anyway\n");
|
||||
BUS_ADD_CHILD(parent, 100, "pcib", 0);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -420,6 +420,7 @@ static void
|
||||
nexus_pcib_identify(driver_t *driver, device_t parent)
|
||||
{
|
||||
pcicfgregs probe;
|
||||
int found = 0;
|
||||
|
||||
if (pci_cfgopen() == 0)
|
||||
return;
|
||||
@ -455,9 +456,22 @@ nexus_pcib_identify(driver_t *driver, device_t parent)
|
||||
child = BUS_ADD_CHILD(parent, 100,
|
||||
"pcib", busnum);
|
||||
device_set_desc(child, s);
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure we add at least one bridge since some old
|
||||
* hardware doesn't actually have a host-pci bridge device.
|
||||
* Note that pci_cfgopen() thinks we have PCI devices..
|
||||
*/
|
||||
if (!found) {
|
||||
if (bootverbose)
|
||||
printf(
|
||||
"nexus_pcib_identify: no bridge found, adding pcib0 anyway\n");
|
||||
BUS_ADD_CHILD(parent, 100, "pcib", 0);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -420,6 +420,7 @@ static void
|
||||
nexus_pcib_identify(driver_t *driver, device_t parent)
|
||||
{
|
||||
pcicfgregs probe;
|
||||
int found = 0;
|
||||
|
||||
if (pci_cfgopen() == 0)
|
||||
return;
|
||||
@ -455,9 +456,22 @@ nexus_pcib_identify(driver_t *driver, device_t parent)
|
||||
child = BUS_ADD_CHILD(parent, 100,
|
||||
"pcib", busnum);
|
||||
device_set_desc(child, s);
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure we add at least one bridge since some old
|
||||
* hardware doesn't actually have a host-pci bridge device.
|
||||
* Note that pci_cfgopen() thinks we have PCI devices..
|
||||
*/
|
||||
if (!found) {
|
||||
if (bootverbose)
|
||||
printf(
|
||||
"nexus_pcib_identify: no bridge found, adding pcib0 anyway\n");
|
||||
BUS_ADD_CHILD(parent, 100, "pcib", 0);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -420,6 +420,7 @@ static void
|
||||
nexus_pcib_identify(driver_t *driver, device_t parent)
|
||||
{
|
||||
pcicfgregs probe;
|
||||
int found = 0;
|
||||
|
||||
if (pci_cfgopen() == 0)
|
||||
return;
|
||||
@ -455,9 +456,22 @@ nexus_pcib_identify(driver_t *driver, device_t parent)
|
||||
child = BUS_ADD_CHILD(parent, 100,
|
||||
"pcib", busnum);
|
||||
device_set_desc(child, s);
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure we add at least one bridge since some old
|
||||
* hardware doesn't actually have a host-pci bridge device.
|
||||
* Note that pci_cfgopen() thinks we have PCI devices..
|
||||
*/
|
||||
if (!found) {
|
||||
if (bootverbose)
|
||||
printf(
|
||||
"nexus_pcib_identify: no bridge found, adding pcib0 anyway\n");
|
||||
BUS_ADD_CHILD(parent, 100, "pcib", 0);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user