From 12b7f509dcc58e242baa783d96b76cd0a64aea65 Mon Sep 17 00:00:00 2001 From: niruiyu Date: Fri, 17 Dec 2010 05:55:47 +0000 Subject: [PATCH] Removes the assumption in Supported() and Start() routine that the EFI_SIO_PROTOCOL is installed in the immediate child handle of the PCI controller. Multiple SIO platform could have an additional layer between the PCI controller and the EFI_SIO_PROTOCOL instance. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11178 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Bus/Isa/IsaIoDxe/IsaDriver.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaIoDxe/IsaDriver.c b/IntelFrameworkModulePkg/Bus/Isa/IsaIoDxe/IsaDriver.c index 1b06bc5e6e..8c58b318c6 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaIoDxe/IsaDriver.c +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaIoDxe/IsaDriver.c @@ -106,12 +106,6 @@ IsaIoDriverSupported ( // Get the PciIo protocol from its parent controller. // Status = gBS->LocateDevicePath (&gEfiPciIoProtocolGuid, &DevicePath, &PciHandle); - if (!EFI_ERROR (Status)) { - if ((DevicePathType (DevicePath) != ACPI_DEVICE_PATH) || - ((DevicePathSubType (DevicePath) != ACPI_DP) && (DevicePathSubType (DevicePath) != ACPI_EXTENDED_DP))) { - Status = EFI_UNSUPPORTED; - } - } } if (EFI_ERROR (Status)) { @@ -181,7 +175,7 @@ IsaIoDriverStart ( EFI_HANDLE PciHandle; EFI_SIO_PROTOCOL *Sio; ACPI_RESOURCE_HEADER_PTR Resources; - EFI_DEVICE_PATH_PROTOCOL *AcpiNode; + EFI_DEVICE_PATH_PROTOCOL *TempDevicePath; ISA_IO_DEVICE *IsaIoDevice; PciIo = NULL; @@ -205,16 +199,9 @@ IsaIoDriverStart ( // // Get the PciIo protocol from its parent controller. // - AcpiNode = DevicePath; - Status = gBS->LocateDevicePath (&gEfiPciIoProtocolGuid, &AcpiNode, &PciHandle); + TempDevicePath = DevicePath; + Status = gBS->LocateDevicePath (&gEfiPciIoProtocolGuid, &TempDevicePath, &PciHandle); if (!EFI_ERROR (Status)) { - // - // AcpiNode should point to the ACPI node now. - // - ASSERT ((DevicePathType (AcpiNode) == ACPI_DEVICE_PATH) && - ((DevicePathSubType (AcpiNode) == ACPI_DP) || (DevicePathSubType (AcpiNode) == ACPI_EXTENDED_DP)) - ); - Status = gBS->HandleProtocol (PciHandle, &gEfiPciIoProtocolGuid, (VOID **) &PciIo); ASSERT_EFI_ERROR (Status);