From 89446d8967361aa6e2eab2b7413d58771591cc32 Mon Sep 17 00:00:00 2001 From: "Zhang, Lubo" Date: Wed, 11 May 2016 09:37:39 +0800 Subject: NetworkPkg: Bug fix of iSCSI to support MPIO 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 Cc: Fu Siyuan Cc: Wu Jiaxin Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo Reviewed-By: Ye Ting Reviewed-By: Fu Siyuan Reviewed-By: Wu Jiaxin --- NetworkPkg/IScsiDxe/IScsiDriver.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'NetworkPkg') diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.c b/NetworkPkg/IScsiDxe/IScsiDriver.c index 12095cb3f..5a121ce9b 100644 --- a/NetworkPkg/IScsiDxe/IScsiDriver.c +++ b/NetworkPkg/IScsiDxe/IScsiDriver.c @@ -865,10 +865,22 @@ IScsiStart ( IScsiSessionAbort (ExistPrivate->Session); } - Status = IScsiCleanDriverData (ExistPrivate); - if (EFI_ERROR (Status)) { - goto ON_ERROR; + if (ExistPrivate->DevicePath != NULL) { + Status = gBS->UninstallProtocolInterface ( + ExistPrivate->ExtScsiPassThruHandle, + &gEfiDevicePathProtocolGuid, + ExistPrivate->DevicePath + ); + if (EFI_ERROR (Status)) { + goto ON_ERROR; + } + + FreePool (ExistPrivate->DevicePath); } + + gBS->CloseEvent (ExistPrivate->ExitBootServiceEvent); + FreePool (ExistPrivate); + } } else { // -- cgit v1.2.3