diff options
author | Laszlo Ersek <lersek@redhat.com> | 2015-09-10 11:25:02 +0000 |
---|---|---|
committer | lersek <lersek@Edk2> | 2015-09-10 11:25:02 +0000 |
commit | fc3c83e0b355bffc6452bb0a0cb81b381684c8c4 (patch) | |
tree | e898eda1b6996a7f43dabdc9534d2fbc10f19de9 | |
parent | 94d449f5df792a485da0aae624968e2ef381aa8a (diff) | |
download | edk2-platforms-fc3c83e0b355bffc6452bb0a0cb81b381684c8c4.tar.xz |
MdeModulePkg: ScsiDiskDxe: recognize EFI_BAD_BUFFER_SIZE
Acting specifically upon this error condition from UefiScsiLib (and
ultimately from EFI_EXT_SCSI_PASS_THRU_PROTOCOL.PassThru()) in the
- ScsiDiskRead10(),
- ScsiDiskWrite10(),
- ScsiDiskRead16(),
- ScsiDiskWrite16()
functions allows us to retry these operations from ScsiDiskReadSectors()
and ScsiDiskWriteSectors(), with adjusted transfer sizes, without
investigating further error details like Host Adapter Status, Target
Status, and Sense Data.
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18437 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c index e7abe544df..6da1751a57 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c @@ -2107,7 +2107,7 @@ BackOff: SectorCount
);
- if (ReturnStatus == EFI_NOT_READY) {
+ if (ReturnStatus == EFI_NOT_READY || ReturnStatus == EFI_BAD_BUFFER_SIZE) {
*NeedRetry = TRUE;
return EFI_DEVICE_ERROR;
} else if ((ReturnStatus == EFI_INVALID_PARAMETER) || (ReturnStatus == EFI_UNSUPPORTED)) {
@@ -2231,7 +2231,7 @@ BackOff: StartLba,
SectorCount
);
- if (ReturnStatus == EFI_NOT_READY) {
+ if (ReturnStatus == EFI_NOT_READY || ReturnStatus == EFI_BAD_BUFFER_SIZE) {
*NeedRetry = TRUE;
return EFI_DEVICE_ERROR;
} else if ((ReturnStatus == EFI_INVALID_PARAMETER) || (ReturnStatus == EFI_UNSUPPORTED)) {
@@ -2354,7 +2354,7 @@ BackOff: StartLba,
SectorCount
);
- if (ReturnStatus == EFI_NOT_READY) {
+ if (ReturnStatus == EFI_NOT_READY || ReturnStatus == EFI_BAD_BUFFER_SIZE) {
*NeedRetry = TRUE;
return EFI_DEVICE_ERROR;
} else if ((ReturnStatus == EFI_INVALID_PARAMETER) || (ReturnStatus == EFI_UNSUPPORTED)) {
@@ -2478,7 +2478,7 @@ BackOff: StartLba,
SectorCount
);
- if (ReturnStatus == EFI_NOT_READY) {
+ if (ReturnStatus == EFI_NOT_READY || ReturnStatus == EFI_BAD_BUFFER_SIZE) {
*NeedRetry = TRUE;
return EFI_DEVICE_ERROR;
} else if ((ReturnStatus == EFI_INVALID_PARAMETER) || (ReturnStatus == EFI_UNSUPPORTED)) {
|