mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
94d449f5df
commit
fc3c83e0b3
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue