aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/isci/remote_device.c
diff options
context:
space:
mode:
authorJeff Skirvin <jeffrey.d.skirvin@intel.com>2012-03-08 22:42:02 -0800
committerDan Williams <dan.j.williams@intel.com>2012-05-17 14:33:41 -0700
commit0c3ce38f1bc8b6a6d8df0959e3c0dece31f9350c (patch)
tree22d5fb8aaea17b1ea51b060e51f5a709e382c6e0 /drivers/scsi/isci/remote_device.c
parent31a38ef0a5ad12dbe262ca55d0a905657be55a8d (diff)
downloadlinux-linaro-stable-0c3ce38f1bc8b6a6d8df0959e3c0dece31f9350c.tar.gz
isci: When in the abort path, defeat other resume calls until done.
Completion of I/Os during the one of the abort path interface calls from libsas can drive remote device state changes and the resumption of the device RNC. This is a problem when the abort path is attempting to cleanup outstanding I/O at the same time - the resumption can prevent the termination from occuring correctly. 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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c
index acc94a454a1f..d1c2a2294a32 100644
--- a/drivers/scsi/isci/remote_device.c
+++ b/drivers/scsi/isci/remote_device.c
@@ -1266,6 +1266,7 @@ enum sci_status isci_remote_device_resume_from_abort(
/* Preserve any current resume callbacks, for instance from other
* resumptions.
*/
+ clear_bit(IDEV_ABORT_PATH_ACTIVE, &idev->flags);
status = sci_remote_device_resume(idev, idev->rnc.user_callback,
idev->rnc.user_cookie);
spin_unlock_irqrestore(&ihost->scic_lock, flags);
@@ -1501,6 +1502,7 @@ enum sci_status isci_remote_device_suspend_terminate(
/* Put the device into suspension. */
spin_lock_irqsave(&ihost->scic_lock, flags);
+ set_bit(IDEV_ABORT_PATH_ACTIVE, &idev->flags);
sci_remote_device_suspend(idev, SCI_SW_SUSPEND_LINKHANG_DETECT);
spin_unlock_irqrestore(&ihost->scic_lock, flags);