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>
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
index c88e270..6cd80bb 100644
--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -790,9 +790,9 @@
{
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 @@
/* 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: