Skip to content

Commit

Permalink
[SCSI] isci: Leave requests alone if already terminating.
Browse files Browse the repository at this point in the history
Instead of immediately completing any request that has a second
termination call made on it, wait for the TC done/abort HW event.

Signed-off-by: Jeff Skirvin <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
  • Loading branch information
Jeff Skirvin authored and James Bottomley committed Aug 24, 2011
1 parent 3a7bda8 commit 39ea2c5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions drivers/scsi/isci/request.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,12 +732,20 @@ sci_io_request_terminate(struct isci_request *ireq)
sci_change_state(&ireq->sm, SCI_REQ_ABORTING);
return SCI_SUCCESS;
case SCI_REQ_TASK_WAIT_TC_RESP:
/* The task frame was already confirmed to have been
* sent by the SCU HW. Since the state machine is
* now only waiting for the task response itself,
* abort the request and complete it immediately
* and don't wait for the task response.
*/
sci_change_state(&ireq->sm, SCI_REQ_ABORTING);
sci_change_state(&ireq->sm, SCI_REQ_COMPLETED);
return SCI_SUCCESS;
case SCI_REQ_ABORTING:
sci_change_state(&ireq->sm, SCI_REQ_COMPLETED);
return SCI_SUCCESS;
/* If a request has a termination requested twice, return
* a failure indication, since HW confirmation of the first
* abort is still outstanding.
*/
case SCI_REQ_COMPLETED:
default:
dev_warn(&ireq->owning_controller->pdev->dev,
Expand Down

0 comments on commit 39ea2c5

Please sign in to comment.