From: Bin Meng Date: Fri, 3 Aug 2018 08:14:37 +0000 (-0700) Subject: dm: pci: Fix scanning multi-function device X-Git-Tag: v2018.09-rc2~60^2~18 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=64e45f73bd0aa9d8a1069587540bc91fe45b62e0;p=oweals%2Fu-boot.git 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 --- diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index b2909a325a..28ea8c5d4e 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 */