From 2603fce126507568f3ce3a4bd67ed51139e3b332 Mon Sep 17 00:00:00 2001 From: "Javeed, Ashraf" Date: Mon, 27 May 2019 18:23:56 +0800 Subject: [PATCH] PciBusDxe: duplicate node insertion for every PPB device in the system https://bugzilla.tianocore.org/show_bug.cgi?id=1796 Bug fixed in PciBusDxe\PciLib.c. Removed the redundant second call to PciSearchDevice sub-routine when the PCD for the Hot-Plug support is disabled. Signed-off-by: Ashraf Javeed Reviewed-by: Ray Ni Acked-by: Hao A Wu Cc: Jian J Wang Cc: Ray Ni --- MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c index f0d9f45c4a..5b55fb5d3b 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c @@ -1114,24 +1114,7 @@ PciScanBus ( // // For PPB // - if (!FeaturePcdGet (PcdPciBusHotplugDeviceSupport)) { - // - // If Hot Plug is not supported, - // get the bridge information - // - Status = PciSearchDevice ( - Bridge, - &Pci, - StartBusNumber, - Device, - Func, - &PciDevice - ); - - if (EFI_ERROR (Status)) { - return Status; - } - } else { + if (FeaturePcdGet (PcdPciBusHotplugDeviceSupport)) { // // If Hot Plug is supported, // Get the bridge information