From: Pali Rohár Date: Mon, 17 Jan 2022 15:38:37 +0000 (+0100) Subject: pci: Fix setting controller's last_busno X-Git-Url: http://git.dujemihanovic.xyz/%22/img/sics.gif/%22/static/git-favicon.png?a=commitdiff_plain;h=8c303bc6e04166db8dce74dbf6b1e46dd9422c47;p=u-boot.git pci: Fix setting controller's last_busno Initially it is set to dev_seq but update to the last bus number is missing. Fix it. Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese --- diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index c66cd756d9..33dda00002 100644 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@ -560,6 +560,8 @@ int pci_auto_config_devices(struct udevice *bus) if (pplat->class == (PCI_CLASS_DISPLAY_VGA << 8)) set_vga_bridge_bits(dev); } + if (hose->last_busno < sub_bus) + hose->last_busno = sub_bus; debug("%s: done\n", __func__); return log_msg_ret("sub", sub_bus);