From f6830005bb1a2fc225c89cdb1367b5058e939acc Mon Sep 17 00:00:00 2001 From: Ruiyu Ni Date: Wed, 23 Mar 2016 13:54:51 +0800 Subject: [PATCH] MdeModulePkg/PciBus: Should reserve enough bus number for HPC When there is no bridge before the HPC (hot plug controller), the issue cannot be seen. But when there are bridges before the HPC, the PciBus will only use the value (= + ) as the sub-ordinary bus number for HPC. The correct sub-ordinary bus number should be: + (by earlier bridges) + . Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Reviewed-by: Jeff Fan --- MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c index 12647be85f..f3407bcb63 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c @@ -1,7 +1,7 @@ /** @file Internal library implementation for PCI Bus module. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
(C) Copyright 2015 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -1232,7 +1232,7 @@ PciScanBus ( // // Reserve the larger one between the actual occupied bus number and padded bus number // - Status = PciAllocateBusNumber (PciDevice, StartBusNumber, (UINT8) (BusRange), &PaddedSubBus); + Status = PciAllocateBusNumber (PciDevice, SecondBus, (UINT8) (BusRange), &PaddedSubBus); if (EFI_ERROR (Status)) { return Status; }