Reviewed-By: Wu Jiaxin <jiaxin...@intel.com>

> -----Original Message-----
> From: Zhang, Lubo
> Sent: Wednesday, May 11, 2016 9:38 AM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting <ting...@intel.com>; Fu, Siyuan <siyuan...@intel.com>; Wu,
> Jiaxin <jiaxin...@intel.com>
> Subject: [patch] 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 <ting...@intel.com>
> Cc: Fu Siyuan <siyuan...@intel.com>
> Cc: Wu Jiaxin <jiaxin...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Zhang Lubo <lubo.zh...@intel.com>
> ---
>  NetworkPkg/IScsiDxe/IScsiDriver.c | 18 +++++++++++++++---
>  1 file changed, 15 insertions(+), 3 deletions(-)
> 
> diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.c
> b/NetworkPkg/IScsiDxe/IScsiDriver.c
> index 12095cb..5a121ce 100644
> --- a/NetworkPkg/IScsiDxe/IScsiDriver.c
> +++ b/NetworkPkg/IScsiDxe/IScsiDriver.c
> @@ -863,14 +863,26 @@ IScsiStart (
>          IScsiRemoveNic (ExistPrivate->Controller);
>          if (ExistPrivate->Session != NULL) {
>            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 {
>        //
>        // Use the attempt in earlier order as boot selected in single path 
> mode.
>        //
> --
> 1.9.5.msysgit.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to