diff options
author | Jeff Skirvin <jeffrey.d.skirvin@intel.com> | 2012-03-12 20:29:51 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2012-05-17 17:33:44 -0400 |
commit | 3ef768c6c0caa83b9fe66f19a18898ed0315ac36 (patch) | |
tree | cf8233efe91dfac3232f06a51f58c4e4c5a508b3 /drivers/scsi/isci/remote_device.c | |
parent | f8381807ebdfffa34c2c5aa38eda33673d1a7adf (diff) |
isci: Manage the IREQ_NO_AUTO_FREE_TAG under scic_lock.
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>
Diffstat (limited to 'drivers/scsi/isci/remote_device.c')
-rw-r--r-- | drivers/scsi/isci/remote_device.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c index 48765aa84328..a3a6487264ea 100644 --- a/drivers/scsi/isci/remote_device.c +++ b/drivers/scsi/isci/remote_device.c | |||
@@ -243,8 +243,11 @@ enum sci_status isci_remote_device_terminate_requests( | |||
243 | idev->rnc.destination_state, | 243 | idev->rnc.destination_state, |
244 | ireq, ireq->flags); | 244 | ireq, ireq->flags); |
245 | } | 245 | } |
246 | spin_lock_irqsave(&ihost->scic_lock, flags); | ||
246 | clear_bit(IREQ_NO_AUTO_FREE_TAG, &ireq->flags); | 247 | clear_bit(IREQ_NO_AUTO_FREE_TAG, &ireq->flags); |
247 | isci_free_tag(ihost, ireq->io_tag); | 248 | if (!test_bit(IREQ_ABORT_PATH_ACTIVE, &ireq->flags)) |
249 | isci_free_tag(ihost, ireq->io_tag); | ||
250 | spin_unlock_irqrestore(&ihost->scic_lock, flags); | ||
248 | } else { | 251 | } else { |
249 | /* Terminate all TCs. */ | 252 | /* Terminate all TCs. */ |
250 | sci_remote_device_terminate_requests(idev); | 253 | sci_remote_device_terminate_requests(idev); |