diff options
-rw-r--r-- | MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c index b06f9889ed..320ee90828 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c @@ -1967,6 +1967,12 @@ AtaPacketReadWrite ( // to see whether indicates device is ready to transfer data.
//
Status = DRQReady2 (PciIo, IdeRegisters, Timeout);
+ if ((Status == EFI_NOT_READY) && Read) {
+ //
+ // Device provided less data than we intended to read -- exit early.
+ //
+ return CheckStatusRegister (PciIo, IdeRegisters);
+ }
if (EFI_ERROR (Status)) {
return Status;
}
|