diff options
author | Don Brace <don.brace@microsemi.com> | 2019-07-24 18:08:06 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-07-30 12:39:58 -0400 |
commit | eeebce1862970653cdf5c01e98bc669edd8f529a (patch) | |
tree | b456208d97845d5a55ef692fb4404f2b0cda475a | |
parent | d478418703d6bcdd163d5d8127683c6c471539f0 (diff) |
scsi: hpsa: correct scsi command status issue after reset
Reviewed-by: Bader Ali - Saleh <bader.alisaleh@microsemi.com>
Reviewed-by: Scott Teel <scott.teel@microsemi.com>
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/hpsa.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 43a6b5350775..89e71ebc5964 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c | |||
@@ -2334,6 +2334,8 @@ static int handle_ioaccel_mode2_error(struct ctlr_info *h, | |||
2334 | case IOACCEL2_SERV_RESPONSE_COMPLETE: | 2334 | case IOACCEL2_SERV_RESPONSE_COMPLETE: |
2335 | switch (c2->error_data.status) { | 2335 | switch (c2->error_data.status) { |
2336 | case IOACCEL2_STATUS_SR_TASK_COMP_GOOD: | 2336 | case IOACCEL2_STATUS_SR_TASK_COMP_GOOD: |
2337 | if (cmd) | ||
2338 | cmd->result = 0; | ||
2337 | break; | 2339 | break; |
2338 | case IOACCEL2_STATUS_SR_TASK_COMP_CHK_COND: | 2340 | case IOACCEL2_STATUS_SR_TASK_COMP_CHK_COND: |
2339 | cmd->result |= SAM_STAT_CHECK_CONDITION; | 2341 | cmd->result |= SAM_STAT_CHECK_CONDITION; |
@@ -2483,8 +2485,10 @@ static void process_ioaccel2_completion(struct ctlr_info *h, | |||
2483 | 2485 | ||
2484 | /* check for good status */ | 2486 | /* check for good status */ |
2485 | if (likely(c2->error_data.serv_response == 0 && | 2487 | if (likely(c2->error_data.serv_response == 0 && |
2486 | c2->error_data.status == 0)) | 2488 | c2->error_data.status == 0)) { |
2489 | cmd->result = 0; | ||
2487 | return hpsa_cmd_free_and_done(h, c, cmd); | 2490 | return hpsa_cmd_free_and_done(h, c, cmd); |
2491 | } | ||
2488 | 2492 | ||
2489 | /* | 2493 | /* |
2490 | * Any RAID offload error results in retry which will use | 2494 | * Any RAID offload error results in retry which will use |
@@ -5654,6 +5658,12 @@ static int hpsa_scsi_queue_command(struct Scsi_Host *sh, struct scsi_cmnd *cmd) | |||
5654 | return SCSI_MLQUEUE_DEVICE_BUSY; | 5658 | return SCSI_MLQUEUE_DEVICE_BUSY; |
5655 | 5659 | ||
5656 | /* | 5660 | /* |
5661 | * This is necessary because the SML doesn't zero out this field during | ||
5662 | * error recovery. | ||
5663 | */ | ||
5664 | cmd->result = 0; | ||
5665 | |||
5666 | /* | ||
5657 | * Call alternate submit routine for I/O accelerated commands. | 5667 | * Call alternate submit routine for I/O accelerated commands. |
5658 | * Retries always go down the normal I/O path. | 5668 | * Retries always go down the normal I/O path. |
5659 | */ | 5669 | */ |