From: Ye Ting Date: Fri, 18 Oct 2013 02:43:34 +0000 (+0000) Subject: Fix an issue that execute "map -r" in UEFI shell cannot reinstate iSCSI session with... X-Git-Tag: edk2-stable201903~12176 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=e8b1fb2e60f8c518d3afe1300ccdbab96f107d15 Fix an issue that execute "map -r" in UEFI shell cannot reinstate iSCSI session with Microsoft iSCSI target after unplug/plug network cable. Signed-off-by: Ye Ting Reviewed-by: Fu Siyuan git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14781 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/NetworkPkg/IScsiDxe/IScsiProto.c b/NetworkPkg/IScsiDxe/IScsiProto.c index e7493c61f6..02953c3bac 100644 --- a/NetworkPkg/IScsiDxe/IScsiProto.c +++ b/NetworkPkg/IScsiDxe/IScsiProto.c @@ -2851,7 +2851,8 @@ IScsiExecuteScsiCommand ( Timeout = 0; if (Session->State != SESSION_STATE_LOGGED_IN) { - return EFI_DEVICE_ERROR; + Status = EFI_DEVICE_ERROR; + goto ON_EXIT; } Conn = NET_LIST_USER_STRUCT_S ( @@ -3025,7 +3026,7 @@ IScsiSessionReinstatement ( { EFI_STATUS Status; - ASSERT (Session->State == SESSION_STATE_LOGGED_IN); + ASSERT (Session->State != SESSION_STATE_FREE); // // Abort the session and re-init it.