mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
drivers: pci: ignore disabled devices
PCI devices may be disabled in the device tree. Devices which are probed by the device tree handle the "status" property and are skipped if disabled. Devices which are probed by the PCI enumeration don't check that property. Fix it. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Alex Marginean <alexandru.marginean@nxp.com> Tested-by: Alex Marginean <alexandru.marginean@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
7e5ee346fc
commit
a6cd597a78
1 changed files with 5 additions and 0 deletions
|
@ -677,6 +677,11 @@ static int pci_find_and_bind_driver(struct udevice *parent,
|
|||
/* Determine optional OF node */
|
||||
pci_dev_find_ofnode(parent, bdf, &node);
|
||||
|
||||
if (ofnode_valid(node) && !ofnode_is_available(node)) {
|
||||
debug("%s: Ignoring disabled device\n", __func__);
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
start = ll_entry_start(struct pci_driver_entry, pci_driver_entry);
|
||||
n_ents = ll_entry_count(struct pci_driver_entry, pci_driver_entry);
|
||||
for (entry = start; entry != start + n_ents; entry++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue