diff options
author | Johannes Thumshirn <jthumshirn@suse.de> | 2018-06-25 07:20:58 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-06-26 12:27:06 -0400 |
commit | c65be1a63f1df224c8f22d72b9ec824241ada585 (patch) | |
tree | 92d2f1e475f5556095f02b172cd7b7ac595e6479 /drivers/scsi/dc395x.c | |
parent | 8e1695a07c7b28e2eb1c02cc01e2b8f5dd28bf87 (diff) |
scsi: core: check for equality of result byte values
When evaluating a SCSI command's result using the field access macros,
check for equality of the fields and not if a specific bit is set.
This is a preparation patch, for reworking the results field in the
SCSI command.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/dc395x.c')
-rw-r--r-- | drivers/scsi/dc395x.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 60ef8df42b95..1ed2cd82129d 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c | |||
@@ -3473,9 +3473,8 @@ static void srb_done(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb, | |||
3473 | 3473 | ||
3474 | /*if( srb->cmd->cmnd[0] == INQUIRY && */ | 3474 | /*if( srb->cmd->cmnd[0] == INQUIRY && */ |
3475 | /* (host_byte(cmd->result) == DID_OK || status_byte(cmd->result) & CHECK_CONDITION) ) */ | 3475 | /* (host_byte(cmd->result) == DID_OK || status_byte(cmd->result) & CHECK_CONDITION) ) */ |
3476 | if ((cmd->result == (DID_OK << 16) | 3476 | if ((cmd->result == (DID_OK << 16) || |
3477 | || status_byte(cmd->result) & | 3477 | status_byte(cmd->result) == CHECK_CONDITION)) { |
3478 | CHECK_CONDITION)) { | ||
3479 | if (!dcb->init_tcq_flag) { | 3478 | if (!dcb->init_tcq_flag) { |
3480 | add_dev(acb, dcb, ptr); | 3479 | add_dev(acb, dcb, ptr); |
3481 | dcb->init_tcq_flag = 1; | 3480 | dcb->init_tcq_flag = 1; |