summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2018-08-03 01:14:37 -0700
committerSimon Glass <sjg@chromium.org>2018-08-08 12:49:31 +0100
commit64e45f73bd0aa9d8a1069587540bc91fe45b62e0 (patch)
treee9b7ee1f7d291255ec57a77cf03a9f635df158a5 /drivers
parent1f6b08b969b345a83b63f481e50555536d89854f (diff)
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 <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/pci-uclass.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index b2909a325ac..28ea8c5d4ee 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 */