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

Hannes Reinecke
2021-04-22T06:31:45Z

On 4/21/21 11:06 PM, Bart Van Assche wrote:
> 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.
>
Okay, will do.

Cheers,

Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer