From aa14510295d3d87431c915c0b2bc5dd3af7f2c35 Mon Sep 17 00:00:00 2001 From: Jeff Skirvin Date: Mon, 7 Mar 2011 16:40:47 -0700 Subject: 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 Signed-off-by: Dan Williams --- drivers/scsi/isci/task.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'drivers/scsi/isci/task.h') 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) { -- cgit v1.2.3