Message ID | 20191104090151.129140-8-hare@suse.de (mailing list archive) |
---|---|
State | Deferred |
Headers | show |
Series | Revamp SCSI result values | expand |
On 11/4/19 1:01 AM, Hannes Reinecke wrote: > Use standard SAM status codes and omit the explicit shift to convert > from linux-specific ones. Reviewed-by: Bart Van Assche <bvanassche@acm.org>
On Mon, Nov 4, 2019 at 9:39 AM Bart Van Assche <bvanassche@acm.org> wrote: > > On 11/4/19 1:01 AM, Hannes Reinecke wrote: > > Use standard SAM status codes and omit the explicit shift to convert > > from linux-specific ones. > > Reviewed-by: Bart Van Assche <bvanassche@acm.org> Acked-by: Adam Radford <aradford@gmail.com>
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index 2b1e0d503020..79eca8f1fd05 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c @@ -429,7 +429,7 @@ static int tw_decode_sense(TW_Device_Extension *tw_dev, int request_id, int fill /* Additional sense code qualifier */ tw_dev->srb[request_id]->sense_buffer[13] = tw_sense_table[i][3]; - tw_dev->srb[request_id]->result = (DID_OK << 16) | (CHECK_CONDITION << 1); + tw_dev->srb[request_id]->result = (DID_OK << 16) | SAM_STAT_CHECK_CONDITION; return TW_ISR_DONT_RESULT; /* Special case for isr to not over-write result */ } } @@ -2164,7 +2164,7 @@ static irqreturn_t tw_interrupt(int irq, void *dev_instance) /* If error, command failed */ if (error == 1) { /* Ask for a host reset */ - tw_dev->srb[request_id]->result = (DID_OK << 16) | (CHECK_CONDITION << 1); + tw_dev->srb[request_id]->result = (DID_OK << 16) | SAM_STAT_CHECK_CONDITION; } /* Now complete the io */
Use standard SAM status codes and omit the explicit shift to convert from linux-specific ones. Signed-off-by: Hannes Reinecke <hare@suse.de> --- drivers/scsi/3w-xxxx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)