Commit eeebce18 authored by Don Brace's avatar Don Brace Committed by Martin K. Petersen

scsi: hpsa: correct scsi command status issue after reset

Reviewed-by: default avatarBader Ali - Saleh <bader.alisaleh@microsemi.com>
Reviewed-by: default avatarScott Teel <scott.teel@microsemi.com>
Reviewed-by: default avatarScott Benesh <scott.benesh@microsemi.com>
Reviewed-by: default avatarKevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: default avatarDon Brace <don.brace@microsemi.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent d4784187
...@@ -2334,6 +2334,8 @@ static int handle_ioaccel_mode2_error(struct ctlr_info *h, ...@@ -2334,6 +2334,8 @@ static int handle_ioaccel_mode2_error(struct ctlr_info *h,
case IOACCEL2_SERV_RESPONSE_COMPLETE: case IOACCEL2_SERV_RESPONSE_COMPLETE:
switch (c2->error_data.status) { switch (c2->error_data.status) {
case IOACCEL2_STATUS_SR_TASK_COMP_GOOD: case IOACCEL2_STATUS_SR_TASK_COMP_GOOD:
if (cmd)
cmd->result = 0;
break; break;
case IOACCEL2_STATUS_SR_TASK_COMP_CHK_COND: case IOACCEL2_STATUS_SR_TASK_COMP_CHK_COND:
cmd->result |= SAM_STAT_CHECK_CONDITION; cmd->result |= SAM_STAT_CHECK_CONDITION;
...@@ -2483,8 +2485,10 @@ static void process_ioaccel2_completion(struct ctlr_info *h, ...@@ -2483,8 +2485,10 @@ static void process_ioaccel2_completion(struct ctlr_info *h,
/* check for good status */ /* check for good status */
if (likely(c2->error_data.serv_response == 0 && if (likely(c2->error_data.serv_response == 0 &&
c2->error_data.status == 0)) c2->error_data.status == 0)) {
cmd->result = 0;
return hpsa_cmd_free_and_done(h, c, cmd); return hpsa_cmd_free_and_done(h, c, cmd);
}
/* /*
* Any RAID offload error results in retry which will use * Any RAID offload error results in retry which will use
...@@ -5653,6 +5657,12 @@ static int hpsa_scsi_queue_command(struct Scsi_Host *sh, struct scsi_cmnd *cmd) ...@@ -5653,6 +5657,12 @@ static int hpsa_scsi_queue_command(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
if (c == NULL) if (c == NULL)
return SCSI_MLQUEUE_DEVICE_BUSY; return SCSI_MLQUEUE_DEVICE_BUSY;
/*
* This is necessary because the SML doesn't zero out this field during
* error recovery.
*/
cmd->result = 0;
/* /*
* Call alternate submit routine for I/O accelerated commands. * Call alternate submit routine for I/O accelerated commands.
* Retries always go down the normal I/O path. * Retries always go down the normal I/O path.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment