Reviewed-By: Wu Jiaxin <[email protected]>

> -----Original Message-----
> From: Zhang, Lubo
> Sent: Wednesday, May 11, 2016 9:38 AM
> To: [email protected]
> Cc: Ye, Ting <[email protected]>; Fu, Siyuan <[email protected]>; Wu,
> Jiaxin <[email protected]>
> 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 <[email protected]>
> Cc: Fu Siyuan <[email protected]>
> Cc: Wu Jiaxin <[email protected]>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Zhang Lubo <[email protected]>
> ---
>  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
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to