Re: [PATCH 07/42] scsi: Kill DRIVER_SENSE

Bart Van Assche
2021-04-21T21:06:34Z

On 4/21/21 10:47 AM, Hannes Reinecke wrote:
> diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
> index 6a5b844a8499..2b6138a7c71f 100644
> --- a/drivers/scsi/megaraid/megaraid_mbox.c
> +++ b/drivers/scsi/megaraid/megaraid_mbox.c
> @@ -2299,8 +2299,7 @@ megaraid_mbox_dpc(unsigned long devp)
> memcpy(scp->sense_buffer, pthru->reqsensearea,
> 14);
>
> - scp->result = DRIVER_SENSE << 24 |
> - DID_OK << 16 | CHECK_CONDITION << 1;
> + scp->result = DID_OK << 16 | SAM_STAT_CHECK_CONDITION;
> }
> else {
> if (mbox->cmd == MBOXCMD_EXTPTHRU) {
> @@ -2308,9 +2307,8 @@ megaraid_mbox_dpc(unsigned long devp)
> memcpy(scp->sense_buffer,
> epthru->reqsensearea, 14);
>
> - scp->result = DRIVER_SENSE << 24 |
> - DID_OK << 16 |
> - CHECK_CONDITION << 1;
> + scp->result = DID_OK << 16 |
> + SAM_STAT_CHECK_CONDITION;
> } else
> scsi_build_sense(scp, 0,
> ABORTED_COMMAND, 0, 0);

Since DID_OK == 0 I prefer to leave out the 'DID_OK << 16' expressions
from code that is modified.

Thanks,

Bart.