MdeModulePkg/PciBus: Remove unnecessary PCIE detection

CreatePciIoDevice() detects whether the PCI device is a PCI Express
device and remembers the device type in PciIoDevice->IsPciExp.

RegisterPciDevice() detects the device type again which is
unnecessary. The detection logic can be removed.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
Ruiyu Ni 2018-05-25 17:47:43 +08:00
parent 60cb4d1b04
commit 2b5f0daa6c
1 changed files with 1 additions and 16 deletions

View File

@ -1,7 +1,7 @@
/** @file
Supporting functions implementaion for PCI devices management.
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -211,7 +211,6 @@ RegisterPciDevice (
EFI_STATUS Status;
VOID *PlatformOpRomBuffer;
UINTN PlatformOpRomSize;
UINT8 PciExpressCapRegOffset;
EFI_PCI_IO_PROTOCOL *PciIo;
UINT8 Data8;
BOOLEAN HasEfiImage;
@ -231,20 +230,6 @@ RegisterPciDevice (
return Status;
}
//
// Detect if PCI Express Device
//
PciExpressCapRegOffset = 0;
Status = LocateCapabilityRegBlock (
PciIoDevice,
EFI_PCI_CAPABILITY_ID_PCIEXP,
&PciExpressCapRegOffset,
NULL
);
if (!EFI_ERROR (Status)) {
PciIoDevice->IsPciExp = TRUE;
}
//
// Force Interrupt line to "Unknown" or "No Connection"
//