-----Original Message-----
> From: [email protected] [mailto:linux-scsi-
> [email protected]] On Behalf Of Hannes Reinecke
> Sent: Friday, June 23, 2017 7:03 AM
> To: Martin K. Petersen <[email protected]>
> Cc: Christoph Hellwig <[email protected]>; James Bottomley
> <[email protected]>; [email protected];
> Hannes Reinecke <[email protected]>; Hannes Reinecke <[email protected]>
> Subject: [PATCH 19/35] aacraid: split off lun reset function
> 
> The current host reset function does both, a LUN reset over all LUNs followed
> by a host reset.
> So split them off into individual functions.

Hi Hannes,

I don't have a problem with breaking out the two functions, however the LUN 
reset only affects the current scmd, while your change will affect anything 
that has callback data, which may or may not be an scmd. In addition it is 
impacting the whole controller, not just the device affected by the input scmd 
...

Thanks, -Dave
> 
> Signed-off-by: Hannes Reinecke <[email protected]>
> ---
>  drivers/scsi/aacraid/linit.c | 70 
> ++++++++++++++++++++++++++------------------
>  1 file changed, 41 insertions(+), 29 deletions(-)
> 
> diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index
> 0f277df..bbacbf2 100644
> --- a/drivers/scsi/aacraid/linit.c
> +++ b/drivers/scsi/aacraid/linit.c
> @@ -815,11 +815,11 @@ static int aac_eh_abort(struct scsi_cmnd* cmd)  }
> 
> -                       if (fib->hw_fib_va->header.XferState &&
> -                               (fib->flags & FIB_CONTEXT_FLAG) &&
> -                               (fib->callback_data == cmd)) {                
>                                 << only affects one scmd
> -                               fib->flags |= FIB_CONTEXT_FLAG_TIMED_OUT;
> -                               cmd->SCp.phase = AAC_OWNER_ERROR_HANDLER;
> -                       }
> +       /* Mark the assoc. FIB to not complete, eh handler does this */
> +       for (count = 0; count < (host->can_queue + AAC_NUM_MGT_FIB);
> +            ++count) {
> +               struct fib *fib = &aac->fibs[count];
> +
> +               if (fib->hw_fib_va->header.XferState &&
> +                   (fib->flags & FIB_CONTEXT_FLAG) &&
> +                   fib->callback_data) {                                     
>                         << affects anything with callback data
> +                       fib->flags |= FIB_CONTEXT_FLAG_TIMED_OUT;
> +                       cmd = fib->callback_data;
> +                       cmd->SCp.phase = AAC_OWNER_ERROR_HANDLER;
> +                       ret = SUCCESS;
>                 }
>         }
> +       return ret;
> +}

Reply via email to