summaryrefslogtreecommitdiff
path: root/drivers/scsi/isci/task.h
diff options
context:
space:
mode:
authorJeff Skirvin <jeffrey.d.skirvin@intel.com>2011-03-08 02:40:47 +0300
committerDan Williams <dan.j.williams@intel.com>2011-07-03 14:55:30 +0400
commitaa14510295d3d87431c915c0b2bc5dd3af7f2c35 (patch)
tree7dddb3f3ab2fa9c90d0155f18230bb9e630f6018 /drivers/scsi/isci/task.h
parent50e7f9b5a9ae4a763b2c27500807cf237faca9b0 (diff)
downloadlinux-aa14510295d3d87431c915c0b2bc5dd3af7f2c35.tar.xz
isci: Always set response/status for requests going into the error path.
In the case of I/O requests being failed because of a required device reset condition, set the response and status to indicate an I/O failure. 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/task.h')
-rw-r--r--drivers/scsi/isci/task.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/scsi/isci/task.h b/drivers/scsi/isci/task.h
index e1c9c8f04050..b84bedd94601 100644
--- a/drivers/scsi/isci/task.h
+++ b/drivers/scsi/isci/task.h
@@ -302,14 +302,19 @@ isci_task_set_completion_status(
spin_lock_irqsave(&task->task_state_lock, flags);
- task->task_status.resp = response;
- task->task_status.stat = status;
-
/* If a device reset is being indicated, make sure the I/O
* is in the error path.
*/
- if (task->task_state_flags & SAS_TASK_NEED_DEV_RESET)
+ if (task->task_state_flags & SAS_TASK_NEED_DEV_RESET) {
+
+ /* Fail the I/O to make sure it goes into the error path. */
+ response = SAS_TASK_UNDELIVERED;
+ status = SAM_STAT_TASK_ABORTED;
+
task_notification_selection = isci_perform_error_io_completion;
+ }
+ task->task_status.resp = response;
+ task->task_status.stat = status;
switch (task_notification_selection) {