Hi, Kulkarni
It needs to return a EFI_DEVICE_ERROR.
Please refer to SATA2.6 section 11.7 PIO data-in command protocol, the device will send D2H to show there is an error happened.
Thanks
Feng
From: Ganapatrao Kulkarni [mailto:gpkulkarni@gmail.com]
Sent: Tuesday, June 03, 2014 2:00 PM
To: edk2-devel@lists.sourceforge.net; linaro-uefi@lists.linaro.org
Subject: [edk2] Fix to a bug in AhciMode.c
Hi All,
below patch fixes the bug which assigns the Status to error code on success.
thanks
Ganapat
diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
index 950b5da..ab18dcb 100644
--- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
+++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
@@ -782,7 +782,6 @@ AhciPioTransfer (
Offset = FisBaseAddr + EFI_AHCI_D2H_FIS_OFFSET;
Status = AhciCheckMemSet (Offset, EFI_AHCI_FIS_TYPE_MASK, EFI_AHCI_FIS_REGISTER_D2H, 0);
if (!EFI_ERROR (Status)) {
- Status = EFI_DEVICE_ERROR;
break;
}