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 <jsd@semihalf.com>
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
This commit is contained in:
Jan D?bro? 2016-06-21 08:37:06 +08:00 committed by Feng Tian
parent 59e2626181
commit 5e90aa1e20
1 changed files with 1 additions and 17 deletions

View File

@ -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.