From 5e90aa1e207344723b28dd87bb5af14a0a775494 Mon Sep 17 00:00:00 2001 From: Jan D?bro? Date: Tue, 21 Jun 2016 08:37:06 +0800 Subject: MdedulePkg: AtaAtapiPassThru: Remove polling on PxCMD.FR flag setting It is enough to set PxCMD.FRE bit, which cause HBA to post received FISes into the FIS receive area. According to AHCI Specification, only polling on PxCMD.FRE to be cleared is necessary, when it is needeed to stop FIS engine (eg. in order to change PxCMD.FB address). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jan Dabros Signed-off-by: Marcin Wojtas Reviewed-by: Feng Tian --- MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'MdeModulePkg/Bus') diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c index 3534d9fc23..469a40ac39 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c @@ -427,13 +427,7 @@ AhciEnableFisReceive ( Offset = EFI_AHCI_PORT_START + Port * EFI_AHCI_PORT_REG_WIDTH + EFI_AHCI_PORT_CMD; AhciOrReg (PciIo, Offset, EFI_AHCI_PORT_CMD_FRE); - return AhciWaitMmioSet ( - PciIo, - Offset, - EFI_AHCI_PORT_CMD_FR, - EFI_AHCI_PORT_CMD_FR, - Timeout - ); + return EFI_SUCCESS; } /** @@ -2344,16 +2338,6 @@ AhciModeInitialization ( // Offset = EFI_AHCI_PORT_START + Port * EFI_AHCI_PORT_REG_WIDTH + EFI_AHCI_PORT_CMD; AhciOrReg (PciIo, Offset, EFI_AHCI_PORT_CMD_FRE); - Status = AhciWaitMmioSet ( - PciIo, - Offset, - EFI_AHCI_PORT_CMD_FR, - EFI_AHCI_PORT_CMD_FR, - EFI_AHCI_PORT_CMD_FR_CLEAR_TIMEOUT - ); - if (EFI_ERROR (Status)) { - continue; - } // // Wait no longer than 10 ms to wait the Phy to detect the presence of a device. -- cgit v1.2.3