Skip to content

Commit

Permalink
isci: Manage the IREQ_NO_AUTO_FREE_TAG under scic_lock.
Browse files Browse the repository at this point in the history
Since there is a possibilty of a timeout waiting for the RNC suspension,
handle the exit case from the task termination under scic_lock, and leave
the tag allocated if the termination timed-out.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
Jeff Skirvin authored and Dan Williams committed May 17, 2012
1 parent f838180 commit 3ef768c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/scsi/isci/remote_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,11 @@ enum sci_status isci_remote_device_terminate_requests(
idev->rnc.destination_state,
ireq, ireq->flags);
}
spin_lock_irqsave(&ihost->scic_lock, flags);
clear_bit(IREQ_NO_AUTO_FREE_TAG, &ireq->flags);
isci_free_tag(ihost, ireq->io_tag);
if (!test_bit(IREQ_ABORT_PATH_ACTIVE, &ireq->flags))
isci_free_tag(ihost, ireq->io_tag);
spin_unlock_irqrestore(&ihost->scic_lock, flags);
} else {
/* Terminate all TCs. */
sci_remote_device_terminate_requests(idev);
Expand Down

0 comments on commit 3ef768c

Please sign in to comment.