aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/linit.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r--drivers/scsi/aacraid/linit.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 742e1a8edc60..6a553ea730db 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -536,17 +536,33 @@ static int aac_eh_abort(struct scsi_cmnd* cmd)
536 break; 536 break;
537 case INQUIRY: 537 case INQUIRY:
538 case READ_CAPACITY: 538 case READ_CAPACITY:
539 case TEST_UNIT_READY:
540 /* Mark associated FIB to not complete, eh handler does this */ 539 /* Mark associated FIB to not complete, eh handler does this */
541 for (count = 0; count < (host->can_queue + AAC_NUM_MGT_FIB); ++count) { 540 for (count = 0; count < (host->can_queue + AAC_NUM_MGT_FIB); ++count) {
542 struct fib * fib = &aac->fibs[count]; 541 struct fib * fib = &aac->fibs[count];
543 if (fib->hw_fib_va->header.XferState && 542 if (fib->hw_fib_va->header.XferState &&
543 (fib->flags & FIB_CONTEXT_FLAG) &&
544 (fib->callback_data == cmd)) { 544 (fib->callback_data == cmd)) {
545 fib->flags |= FIB_CONTEXT_FLAG_TIMED_OUT; 545 fib->flags |= FIB_CONTEXT_FLAG_TIMED_OUT;
546 cmd->SCp.phase = AAC_OWNER_ERROR_HANDLER; 546 cmd->SCp.phase = AAC_OWNER_ERROR_HANDLER;
547 ret = SUCCESS; 547 ret = SUCCESS;
548 } 548 }
549 } 549 }
550 break;
551 case TEST_UNIT_READY:
552 /* Mark associated FIB to not complete, eh handler does this */
553 for (count = 0; count < (host->can_queue + AAC_NUM_MGT_FIB); ++count) {
554 struct scsi_cmnd * command;
555 struct fib * fib = &aac->fibs[count];
556 if ((fib->hw_fib_va->header.XferState & cpu_to_le32(Async | NoResponseExpected)) &&
557 (fib->flags & FIB_CONTEXT_FLAG) &&
558 ((command = fib->callback_data)) &&
559 (command->device == cmd->device)) {
560 fib->flags |= FIB_CONTEXT_FLAG_TIMED_OUT;
561 command->SCp.phase = AAC_OWNER_ERROR_HANDLER;
562 if (command == cmd)
563 ret = SUCCESS;
564 }
565 }
550 } 566 }
551 return ret; 567 return ret;
552} 568}
@@ -569,6 +585,7 @@ static int aac_eh_reset(struct scsi_cmnd* cmd)
569 for (count = 0; count < (host->can_queue + AAC_NUM_MGT_FIB); ++count) { 585 for (count = 0; count < (host->can_queue + AAC_NUM_MGT_FIB); ++count) {
570 struct fib * fib = &aac->fibs[count]; 586 struct fib * fib = &aac->fibs[count];
571 if (fib->hw_fib_va->header.XferState && 587 if (fib->hw_fib_va->header.XferState &&
588 (fib->flags & FIB_CONTEXT_FLAG) &&
572 (fib->callback_data == cmd)) { 589 (fib->callback_data == cmd)) {
573 fib->flags |= FIB_CONTEXT_FLAG_TIMED_OUT; 590 fib->flags |= FIB_CONTEXT_FLAG_TIMED_OUT;
574 cmd->SCp.phase = AAC_OWNER_ERROR_HANDLER; 591 cmd->SCp.phase = AAC_OWNER_ERROR_HANDLER;