[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [win-pv-devel] [PATCH 1/8] SRB_FUNCTION_RESET_DEVICE should succeed... otherwise the entire controller is reset.



> -----Original Message-----
> From: win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx [mailto:win-pv-devel-
> bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf Of Owen Smith
> Sent: 27 October 2015 11:16
> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Owen Smith
> Subject: [win-pv-devel] [PATCH 1/8] SRB_FUNCTION_RESET_DEVICE should
> succeed... otherwise the entire controller is reset.
> 
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>

Acked-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

> ---
>  src/xenvbd/fdo.c |  2 ++
>  src/xenvbd/pdo.c | 25 ++++++++++++++++++++-----
>  2 files changed, 22 insertions(+), 5 deletions(-)
> 
> diff --git a/src/xenvbd/fdo.c b/src/xenvbd/fdo.c
> index f6b47f2..82b7fb6 100644
> --- a/src/xenvbd/fdo.c
> +++ b/src/xenvbd/fdo.c
> @@ -1449,6 +1449,7 @@ FdoResetBus(
>  {
>      ULONG           TargetId;
> 
> +    Verbose("====>\n");
>      for (TargetId = 0; TargetId < XENVBD_MAX_TARGETS; ++TargetId) {
>          PXENVBD_PDO Pdo = __FdoGetPdo(Fdo, TargetId);
>          if (Pdo) {
> @@ -1456,6 +1457,7 @@ FdoResetBus(
>              PdoDereference(Pdo);
>          }
>      }
> +    Verbose("<====\n");
> 
>      return TRUE;
>  }
> diff --git a/src/xenvbd/pdo.c b/src/xenvbd/pdo.c
> index 198c4d3..de8ba02 100644
> --- a/src/xenvbd/pdo.c
> +++ b/src/xenvbd/pdo.c
> @@ -2242,7 +2242,7 @@ __PdoExecuteScsi(
>      return TRUE;
>  }
> 
> -static FORCEINLINE VOID
> +static FORCEINLINE BOOLEAN
>  __PdoQueueShutdown(
>      __in PXENVBD_PDO             Pdo,
>      __in PSCSI_REQUEST_BLOCK     Srb
> @@ -2253,6 +2253,23 @@ __PdoQueueShutdown(
> 
>      QueueAppend(&Pdo->ShutdownSrbs, &SrbExt->Entry);
>      NotifierKick(Notifier);
> +
> +    return FALSE;
> +}
> +
> +static FORCEINLINE BOOLEAN
> +__PdoReset(
> +    __in PXENVBD_PDO             Pdo,
> +    __in PSCSI_REQUEST_BLOCK     Srb
> +    )
> +{
> +    Verbose("Target[%u] ====>\n", PdoGetTargetId(Pdo));
> +
> +    PdoReset(Pdo);
> +    Srb->SrbStatus = SRB_STATUS_SUCCESS;
> +
> +    Verbose("Target[%u] <====\n", PdoGetTargetId(Pdo));
> +    return TRUE;
>  }
> 
>  static FORCEINLINE VOID
> @@ -2378,13 +2395,11 @@ PdoStartIo(
>          return __PdoExecuteScsi(Pdo, Srb);
> 
>      case SRB_FUNCTION_RESET_DEVICE:
> -        PdoReset(Pdo);
> -        return TRUE;
> +        return __PdoReset(Pdo, Srb);
> 
>      case SRB_FUNCTION_FLUSH:
>      case SRB_FUNCTION_SHUTDOWN:
> -        __PdoQueueShutdown(Pdo, Srb);
> -        return FALSE;
> +        return __PdoQueueShutdown(Pdo, Srb);
> 
>      default:
>          return TRUE;
> --
> 1.9.4.msysgit.1
> 
> 
> _______________________________________________
> win-pv-devel mailing list
> win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel

_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.