Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44081 )
Change subject: device/pci_device.c: Drop static device checking code ......................................................................
device/pci_device.c: Drop static device checking code
Instead, promote a more useful message to warning log level.
Change-Id: I798f825690320d59d447d7fcd9cf9d53a093d05e Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/device/pci_device.c 1 file changed, 3 insertions(+), 36 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/44081/1
diff --git a/src/device/pci_device.c b/src/device/pci_device.c index f3cced9..4a2598a 100644 --- a/src/device/pci_device.c +++ b/src/device/pci_device.c @@ -1113,8 +1113,8 @@ if ((id == 0xffffffff) || (id == 0x00000000) || (id == 0x0000ffff) || (id == 0xffff0000)) { if (dev->enabled) { - printk(BIOS_INFO, "PCI: Static device %s not " - "found, disabling it.\n", dev_path(dev)); + printk(BIOS_WARNING, "PCI: Static device %s not found, " + "disabling it.\n", dev_path(dev)); dev->enabled = 0; } return dev; @@ -1223,8 +1223,7 @@ unsigned int max_devfn) { unsigned int devfn; - struct device *dev, **prev; - int once = 0; + struct device *dev;
printk(BIOS_DEBUG, "PCI: pci_scan_bus for bus %02x\n", bus->secondary);
@@ -1278,38 +1277,6 @@ post_code(0x25);
/* - * Warn if any leftover static devices are are found. - * There's probably a problem in devicetree.cb. - */ - - prev = &bus->children; - for (dev = bus->children; dev; dev = dev->sibling) { - /* - * 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 - * could not be probed). - */ - if (dev->vendor != 0 || dev->hidden) { - prev = &dev->sibling; - continue; - } - - /* Unlink it from list. */ - *prev = dev->sibling; - - /* If disabled in devicetree, do not print any messages. */ - if (!dev->enabled) - continue; - - if (!once++) - printk(BIOS_WARNING, "PCI: Leftover static devices:\n"); - printk(BIOS_WARNING, "%s\n", dev_path(dev)); - } - - if (once) - printk(BIOS_WARNING, "PCI: Check your devicetree.cb.\n"); - - /* * For all children that implement scan_bus() (i.e. bridges) * scan the bus behind that child. */
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44081 )
Change subject: device/pci_device.c: Drop static device checking code ......................................................................
Patch Set 1: Code-Review-2
Not saying it can't be done, but first we have to understand what the removed code did. Please read it. It's more than just printing messages.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44081 )
Change subject: device/pci_device.c: Drop static device checking code ......................................................................
Patch Set 1: Code-Review-2
(2 comments)
Patch Set 1: Code-Review-2
Not saying it can't be done, but first we have to understand what the removed code did. Please read it. It's more than just printing messages.
Yes, I see we're not doing something that seems to be rather important. I wonder how many fireworks happen with this change as-is.
https://review.coreboot.org/c/coreboot/+/44081/1/src/device/pci_device.c File src/device/pci_device.c:
https://review.coreboot.org/c/coreboot/+/44081/1/src/device/pci_device.c@a12... PS1, Line 1293: prev = &dev->sibling; This replaces `prev` with the next element (walks down the chain)
https://review.coreboot.org/c/coreboot/+/44081/1/src/device/pci_device.c@a12... PS1, Line 1298: *prev = dev->sibling; This makes `prev` point to the next element, skipping over the current element.
Angel Pons has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/44081 )
Change subject: device/pci_device.c: Drop static device checking code ......................................................................
Abandoned