From 64e45f73bd0aa9d8a1069587540bc91fe45b62e0 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Fri, 3 Aug 2018 01:14:37 -0700 Subject: [PATCH] dm: pci: Fix scanning multi-function device 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 Reviewed-by: Simon Glass --- 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 */