Re-execute the failed SCSI command if iSCSI driver could reinstates the session successfully.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Dong, Guo <guo.dong@intel.com>
Reviewed-by: Tian, Feng <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15152 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Fu Siyuan
2014-01-22 01:57:06 +00:00
committed by sfu5
parent b36f701d4f
commit cb162780fe
3 changed files with 22 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
/** @file
The implementation of iSCSI protocol based on RFC3720.
Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -2820,6 +2820,7 @@ IScsiOnNopInRcvd (
@retval EFI_DEVICE_ERROR Session state was not as required.
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
@retval EFI_PROTOCOL_ERROR There is no such data in the net buffer.
@retval EFI_NOT_READY The target can not accept new commands.
@retval Others Other errors as indicated.
**/
@@ -2998,15 +2999,6 @@ ON_EXIT:
IScsiDelTcb (Tcb);
}
if ((Status != EFI_SUCCESS) && (Status != EFI_NOT_READY)) {
//
// Reinstate the session.
//
if (EFI_ERROR (IScsiSessionReinstatement (Session))) {
Status = EFI_DEVICE_ERROR;
}
}
return Status;
}