diff options
author | Johannes Thumshirn <jthumshirn@suse.de> | 2018-06-25 13:20:59 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-06-26 18:27:07 +0200 |
commit | 6bec4c3842cd7338973839683bbf96273c3b85f7 (patch) | |
tree | ba97de671cbfeb8c47d7eb3338a2b2be34cec94f /drivers/scsi/mesh.c | |
parent | scsi: core: check for equality of result byte values (diff) | |
download | linux-6bec4c3842cd7338973839683bbf96273c3b85f7.tar.xz linux-6bec4c3842cd7338973839683bbf96273c3b85f7.zip |
scsi: don't add scsi command result bytes
Some drivers are ADDing the scsi command's result bytes instead of ORing
them.
While this can produce correct results it has unexpected side effects.
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/mesh.c')
-rw-r--r-- | drivers/scsi/mesh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c index 1753e42826dd..82e01dbe90af 100644 --- a/drivers/scsi/mesh.c +++ b/drivers/scsi/mesh.c @@ -594,9 +594,9 @@ static void mesh_done(struct mesh_state *ms, int start_next) ms->current_req = NULL; tp->current_req = NULL; if (cmd) { - cmd->result = (ms->stat << 16) + cmd->SCp.Status; + cmd->result = (ms->stat << 16) | cmd->SCp.Status; if (ms->stat == DID_OK) - cmd->result += (cmd->SCp.Message << 8); + cmd->result |= cmd->SCp.Message << 8; if (DEBUG_TARGET(cmd)) { printk(KERN_DEBUG "mesh_done: result = %x, data_ptr=%d, buflen=%d\n", cmd->result, ms->data_ptr, scsi_bufflen(cmd)); |