RE: [PATCH 19/35] aacraid: split off lun reset function

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

 



 -----Original Message-----
> From: linux-scsi-owner@xxxxxxxxxxxxxxx [mailto:linux-scsi-
> owner@xxxxxxxxxxxxxxx] On Behalf Of Hannes Reinecke
> Sent: Friday, June 23, 2017 7:03 AM
> To: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxx>; James Bottomley
> <james.bottomley@xxxxxxxxxxxxxxxxxxxxx>; linux-scsi@xxxxxxxxxxxxxxx;
> Hannes Reinecke <hare@xxxxxxx>; Hannes Reinecke <hare@xxxxxxxx>
> 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 <hare@xxxxxxxx>
> ---
>  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;
> +}





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux