Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Don Brace and committed by
Martin K. Petersen
eeebce18 d4784187

+11 -1
+11 -1
drivers/scsi/hpsa.c
··· 2334 2334 case IOACCEL2_SERV_RESPONSE_COMPLETE: 2335 2335 switch (c2->error_data.status) { 2336 2336 case IOACCEL2_STATUS_SR_TASK_COMP_GOOD: 2337 + if (cmd) 2338 + cmd->result = 0; 2337 2339 break; 2338 2340 case IOACCEL2_STATUS_SR_TASK_COMP_CHK_COND: 2339 2341 cmd->result |= SAM_STAT_CHECK_CONDITION; ··· 2485 2483 2486 2484 /* check for good status */ 2487 2485 if (likely(c2->error_data.serv_response == 0 && 2488 - c2->error_data.status == 0)) 2486 + c2->error_data.status == 0)) { 2487 + cmd->result = 0; 2489 2488 return hpsa_cmd_free_and_done(h, c, cmd); 2489 + } 2490 2490 2491 2491 /* 2492 2492 * Any RAID offload error results in retry which will use ··· 5656 5652 c = cmd_tagged_alloc(h, cmd); 5657 5653 if (c == NULL) 5658 5654 return SCSI_MLQUEUE_DEVICE_BUSY; 5655 + 5656 + /* 5657 + * This is necessary because the SML doesn't zero out this field during 5658 + * error recovery. 5659 + */ 5660 + cmd->result = 0; 5659 5661 5660 5662 /* 5661 5663 * Call alternate submit routine for I/O accelerated commands.