]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
dm: pci: Pass only device/function to pci_bus_find_devfn()
authorBin Meng <bmeng.cn@gmail.com>
Sat, 18 Jul 2015 16:20:05 +0000 (00:20 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 9 Sep 2015 11:50:51 +0000 (13:50 +0200)
In dm_pci_hose_probe_bus(), pci_bus_find_devfn() is called with a bdf
which includes a bus number, but it really should not as this routine
only expects a device/function encoding.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
drivers/pci/pci-uclass.c

index 6d0696a2884e1f4cb2bb0a5da36d744f4a13dff3..bc0be1e9e4939abc4183d7a056212561fc551017 100644 (file)
@@ -326,7 +326,7 @@ int dm_pci_hose_probe_bus(struct pci_controller *hose, pci_dev_t bdf)
        parent = hose->bus;
 
        /* Find the bus within the parent */
-       ret = pci_bus_find_devfn(parent, bdf, &bus);
+       ret = pci_bus_find_devfn(parent, PCI_MASK_BUS(bdf), &bus);
        if (ret) {
                debug("%s: Cannot find device %x on bus %s: %d\n", __func__,
                      bdf, parent->name, ret);