summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/request.c
diff options
context:
space:
mode:
authorJeff Skirvin2011-03-04 23:06:44 +0100
committerDan Williams2011-07-03 12:55:29 +0200
commitec6c9638b0d0537430f78a3e20503b5e68a537b6 (patch)
treeb6d05437adb1c8bc40a02e2fa82ff67df57aef6d /drivers/scsi/isci/request.c
parentisci: fix completion / abort path. (diff)
downloadkernel-qcow2-linux-ec6c9638b0d0537430f78a3e20503b5e68a537b6.tar.gz
kernel-qcow2-linux-ec6c9638b0d0537430f78a3e20503b5e68a537b6.tar.xz
kernel-qcow2-linux-ec6c9638b0d0537430f78a3e20503b5e68a537b6.zip
isci: Any reset indicated on an I/O completion escalates it to the error path.
If there is a pending device reset, the I/O is used to accomplish the reset by setting the RESET bit in the task status, and then putting the task into the error handler path using sas abort task. Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com> Signed-off-by: Jacek Danecki <Jacek.Danecki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/request.c')
-rw-r--r--drivers/scsi/isci/request.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
index c88e270b2b40..6cd80bbdae15 100644
--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -790,9 +790,9 @@ static void isci_task_save_for_upper_layer_completion(
{
struct sas_task *task = isci_request_access_task(request);
- isci_task_set_completion_status(task, response, status,
- task_notification_selection);
-
+ task_notification_selection
+ = isci_task_set_completion_status(task, response, status,
+ task_notification_selection);
/* Tasks aborted specifically by a call to the lldd_abort_task
* function should not be completed to the host in the regular path.
@@ -811,6 +811,9 @@ static void isci_task_save_for_upper_layer_completion(
/* Add to the completed list. */
list_add(&request->completed_node,
&host->requests_to_complete);
+
+ /* Take the request off the device's pending request list. */
+ list_del_init(&request->dev_node);
break;
case isci_perform_aborted_io_completion: