summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Skirvin <jeffrey.d.skirvin@intel.com>2011-03-16 09:41:59 -0700
committerDan Williams <dan.j.williams@intel.com>2011-07-03 03:55:30 -0700
commitc4b9e24c4be67aeed44cd46ef5ea92948d02a426 (patch)
treedc202ca9bd69321fc8b2540d20b8d1fc17a4eb89
parent1077a574103177bff22b7cdd155d960f46ac1e8f (diff)
downloadblackbird-op-linux-c4b9e24c4be67aeed44cd46ef5ea92948d02a426.tar.gz
blackbird-op-linux-c4b9e24c4be67aeed44cd46ef5ea92948d02a426.zip
isci: don't hold scic_lock over calls to sas_task_abort()
In the case where submitted I/Os fail with the status code SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED, the execute function now waits until scic_lock is cleared before calling the helper function "isci_request_signal_device_reset" which sets the flag for the pending reset condition on the I/O. Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r--drivers/scsi/isci/request.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
index 015643104311..eba8e0b3c873 100644
--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -449,26 +449,11 @@ int isci_request_execute(
list_add(&request->dev_node,
&isci_device->reqs_in_process);
- if (status ==
- SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED) {
- /* Signal libsas that we need the SCSI error
- * handler thread to work on this I/O and that
- * we want a device reset.
- */
- isci_request_signal_device_reset(request);
-
- /* Change the status, since we are holding
- * the I/O until it is managed by the SCSI
- * error handler.
- */
- status = SCI_SUCCESS;
- }
- else
+ if (status == SCI_SUCCESS) {
/* Save the tag for possible task mgmt later. */
request->io_tag = scic_io_request_get_io_tag(
request->sci_request_handle);
-
-
+ }
} else
dev_warn(&isci_host->pdev->dev,
"%s: failed request start\n",
@@ -476,6 +461,21 @@ int isci_request_execute(
spin_unlock_irqrestore(&isci_host->scic_lock, flags);
+ if (status ==
+ SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED) {
+ /* Signal libsas that we need the SCSI error
+ * handler thread to work on this I/O and that
+ * we want a device reset.
+ */
+ isci_request_signal_device_reset(request);
+
+ /* Change the status, since we are holding
+ * the I/O until it is managed by the SCSI
+ * error handler.
+ */
+ status = SCI_SUCCESS;
+ }
+
} else
dev_warn(&isci_host->pdev->dev,
"%s: request_construct failed - status = 0x%x\n",
OpenPOWER on IntegriCloud