]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg: Bug fix of iSCSI to support MPIO
authorZhang, Lubo <C:/Program Files (x86)/Git/o=Intel/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=Zhang, Lubob8d>
Wed, 11 May 2016 01:37:39 +0000 (09:37 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Thu, 12 May 2016 01:35:30 +0000 (09:35 +0800)
If two attempts added on different NIC and enable
MPIO attribute, then change the attempts order. If
both two attempts succeed to connect the target,it
should abort the later one in the order and uninstall
ExtScsiPassThruProtocol Interface, But now it
unistall it twice.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-By: Ye Ting <ting.ye@intel.com>
Reviewed-By: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
NetworkPkg/IScsiDxe/IScsiDriver.c

index 12095cb3ffa5d1b16e39a8e63b1bf8c48fe37bbc..5a121ce9b37ad746c36426fdda239cad776a18e2 100644 (file)
@@ -865,10 +865,22 @@ IScsiStart (
           IScsiSessionAbort (ExistPrivate->Session);\r
         }\r
 \r
-        Status = IScsiCleanDriverData (ExistPrivate);\r
-        if (EFI_ERROR (Status)) {\r
-          goto ON_ERROR;\r
+        if (ExistPrivate->DevicePath != NULL) {\r
+          Status = gBS->UninstallProtocolInterface (\r
+                          ExistPrivate->ExtScsiPassThruHandle,\r
+                          &gEfiDevicePathProtocolGuid,\r
+                          ExistPrivate->DevicePath\r
+                          );\r
+          if (EFI_ERROR (Status)) {\r
+            goto ON_ERROR;\r
+          }\r
+\r
+          FreePool (ExistPrivate->DevicePath);\r
         }\r
+\r
+        gBS->CloseEvent (ExistPrivate->ExitBootServiceEvent);\r
+        FreePool (ExistPrivate);\r
+\r
       }\r
     } else {\r
       //\r