drivers: pci: ignore disabled devices
PATCH 1/1 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.
--- drivers/pci/pci-uclass.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/pci/pci-uclass.c +5 -0
@@ -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++) {
Signature · 1 line
2.20.1
PATCH 1/1 drivers: pci: ignore disabled devices
Quoted 10 lines · Michael Walle
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 <[email protected]>--- drivers/pci/pci-uclass.c | 5 +++++ 1 file changed, 5 insertions(+)
PATCH 1/1 drivers: pci: ignore disabled devices
In reply to Michael WalleQuoted 11 lines · Michael Walle
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 <[email protected]>--- drivers/pci/pci-uclass.c | 5 +++++ 1 file changed, 5 insertions(+)
PATCH 1/1 drivers: pci: ignore disabled devices
In reply to Michael WalleQuoted 9 lines · Michael Walle
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 <[email protected]>Reviewed-by Alex Marginean <[email protected]>Tested-by Alex Marginean <[email protected]>Reviewed-by Bin Meng <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20191205/0c202c50/attachment-0001.sig>