The flag to control whether to scan multi-function device during
enumeration should be cleared at the beginning of each iteration
if the device's function number equals to zero.

Signed-off-by: Bin Meng <bmeng...@gmail.com>
---

Changes in v2: None

 drivers/pci/pci-uclass.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index b2909a3..28ea8c5 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -745,6 +745,8 @@ int pci_bind_bus_devices(struct udevice *bus)
                struct udevice *dev;
                ulong class;
 
+               if (!PCI_FUNC(bdf))
+                       found_multi = false;
                if (PCI_FUNC(bdf) && !found_multi)
                        continue;
                /* Check only the first access, we don't expect problems */
-- 
2.7.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to