From 8c303bc6e04166db8dce74dbf6b1e46dd9422c47 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pali=20Roh=C3=A1r?= Date: Mon, 17 Jan 2022 16:38:37 +0100 Subject: [PATCH] pci: Fix setting controller's last_busno MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- 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 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); -- 2.39.5