diff mbox

[U-Boot,v3] pci: Device scanning range fix

Message ID 1461566461-25190-1-git-send-email-ysato@users.sourceforge.jp
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Yoshinori Sato April 25, 2016, 6:41 a.m. UTC
The terminal condition in the area where a PCI device is scanned is wrong,
and 1f.7 isn't scanned.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
---
 drivers/pci/pci-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bin Meng April 25, 2016, 7:07 a.m. UTC | #1
On Mon, Apr 25, 2016 at 2:41 PM, Yoshinori Sato
<ysato@users.sourceforge.jp> wrote:
> The terminal condition in the area where a PCI device is scanned is wrong,
> and 1f.7 isn't scanned.
>
> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
> ---
>  drivers/pci/pci-uclass.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tom Rini April 26, 2016, 12:17 a.m. UTC | #2
On Mon, Apr 25, 2016 at 03:41:01PM +0900, Yoshinori Sato wrote:

> The terminal condition in the area where a PCI device is scanned is wrong,
> and 1f.7 isn't scanned.
> 
> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index c7fbf7b..32590ce 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -682,7 +682,7 @@  int pci_bind_bus_devices(struct udevice *bus)
 	found_multi = false;
 	end = PCI_BDF(bus->seq, PCI_MAX_PCI_DEVICES - 1,
 		      PCI_MAX_PCI_FUNCTIONS - 1);
-	for (bdf = PCI_BDF(bus->seq, 0, 0); bdf < end;
+	for (bdf = PCI_BDF(bus->seq, 0, 0); bdf <= end;
 	     bdf += PCI_BDF(0, 0, 1)) {
 		struct pci_child_platdata *pplat;
 		struct udevice *dev;