aboutsummaryrefslogtreecommitdiff
path: root/src/device/pci_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/pci_device.c')
-rw-r--r--src/device/pci_device.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index ce3e50967a..691ad6b316 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -1006,16 +1006,11 @@ static struct device *pci_scan_get_dev(struct bus *bus, unsigned int devfn)
prev = &bus->children;
for (dev = bus->children; dev; dev = dev->sibling) {
- if (dev->path.type == DEVICE_PATH_PCI) {
- if (dev->path.pci.devfn == devfn) {
- /* Unlink from the list. */
- *prev = dev->sibling;
- dev->sibling = NULL;
- break;
- }
- } else {
- printk(BIOS_ERR, "child %s not a PCI device\n",
- dev_path(dev));
+ if (dev->path.type == DEVICE_PATH_PCI && dev->path.pci.devfn == devfn) {
+ /* Unlink from the list. */
+ *prev = dev->sibling;
+ dev->sibling = NULL;
+ break;
}
prev = &dev->sibling;
}
@@ -1283,6 +1278,16 @@ void pci_scan_bus(struct bus *bus, unsigned int min_devfn,
prev = &bus->children;
for (dev = bus->children; dev; dev = dev->sibling) {
+
+ /*
+ * If static device is not PCI then enable it here and don't
+ * treat it as a leftover device.
+ */
+ if (dev->path.type != DEVICE_PATH_PCI) {
+ enable_static_device(dev);
+ continue;
+ }
+
/*
* The device is only considered leftover if it is not hidden
* and it has a Vendor ID of 0 (the default for a device that