Re: [PATCH 16/42] NCR5380: Fold SCSI message ABORT onto DID_ABORT

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

 



On Wed, 21 Apr 2021, Hannes Reinecke wrote:

> The message byte can take only two values, COMMAND_COMPLETE and ABORT.
> So we can easily map ABORT to DID_ABORT and do not set the message byte.
> 
> Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
> ---
>  drivers/scsi/NCR5380.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
> index 855edda9db41..76b4dce22e03 100644
> --- a/drivers/scsi/NCR5380.c
> +++ b/drivers/scsi/NCR5380.c
> @@ -1827,7 +1827,8 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
>  					hostdata->connected = NULL;
>  					hostdata->busy[scmd_id(cmd)] &= ~(1 << cmd->device->lun);
>  
> -					set_msg_byte(cmd, cmd->SCp.Message);
> +					if (cmd->SCp.Message == ABORT)
> +						set_host_byte(cmd, DID_ABORT);
>  					set_status_byte(cmd, cmd->SCp.Status);
>  
>  					set_resid_from_SCp(cmd);
> 

Can that be expressed more succinctly? E.g.

                                 switch (tmp) {
                                 case ABORT:
+					set_host_byte(cmd, DID_ABORT);
                                 case COMMAND_COMPLETE:

Should this be folded into the preceding patch?



[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