Use standard SAM status codes and omit the explicit shift to convert from linux-specific ones. Signed-off-by: Hannes Reinecke <hare@xxxxxxx> --- drivers/scsi/megaraid/megaraid_mbox.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index f6ac819e6e96..dc58c5ff31e4 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c @@ -1577,7 +1577,7 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy) scp->sense_buffer[0] = 0x70; scp->sense_buffer[2] = ILLEGAL_REQUEST; scp->sense_buffer[12] = MEGA_INVALID_FIELD_IN_CDB; - scp->result = CHECK_CONDITION << 1; + scp->result = SAM_STAT_CHECK_CONDITION; return NULL; } @@ -2302,7 +2302,7 @@ megaraid_mbox_dpc(unsigned long devp) 14); scp->result = DRIVER_SENSE << 24 | - DID_OK << 16 | CHECK_CONDITION << 1; + DID_OK << 16 | SAM_STAT_CHECK_CONDITION; } else { if (mbox->cmd == MBOXCMD_EXTPTHRU) { @@ -2312,11 +2312,11 @@ megaraid_mbox_dpc(unsigned long devp) scp->result = DRIVER_SENSE << 24 | DID_OK << 16 | - CHECK_CONDITION << 1; + SAM_STAT_CHECK_CONDITION; } else { scp->sense_buffer[0] = 0x70; scp->sense_buffer[2] = ABORTED_COMMAND; - scp->result = CHECK_CONDITION << 1; + scp->result = SAM_STAT_CHECK_CONDITION; } } break; @@ -2334,7 +2334,7 @@ megaraid_mbox_dpc(unsigned long devp) */ if (scp->cmnd[0] == TEST_UNIT_READY) { scp->result = DID_ERROR << 16 | - RESERVATION_CONFLICT << 1; + SAM_STAT_RESERVATION_CONFLICT; } else /* @@ -2345,7 +2345,7 @@ megaraid_mbox_dpc(unsigned long devp) scp->cmnd[0] == RELEASE)) { scp->result = DID_ERROR << 16 | - RESERVATION_CONFLICT << 1; + SAM_STAT_RESERVATION_CONFLICT; } else { scp->result = DID_BAD_TARGET << 16 | status; -- 2.16.4