summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/task.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-03-10 06:27:46 +0100
committerDan Williams <dan.j.williams@intel.com>2011-07-03 12:55:30 +0200
commit50e7f9b5a9ae4a763b2c27500807cf237faca9b0 (patch)
tree2275230176a12f2f0a5f7a395100b5a4f2c3e134 /drivers/scsi/isci/task.h
parentisci: Fixed BUG_ON in isci_abort_task_process_cb callback. (diff)
downloadlinux-50e7f9b5a9ae4a763b2c27500807cf237faca9b0.tar.xz
linux-50e7f9b5a9ae4a763b2c27500807cf237faca9b0.zip
isci: Errors in the submit path for SATA devices manage the ap lock.
Since libsas takes the domain device sata_dev.ap->lock before submitting a task, error completions in the submit path for SATA devices must unlock/relock when completing the sas_task back to libsas. 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.h59
1 files changed, 0 insertions, 59 deletions
diff --git a/drivers/scsi/isci/task.h b/drivers/scsi/isci/task.h
index 4c2a27eede49..e1c9c8f04050 100644
--- a/drivers/scsi/isci/task.h
+++ b/drivers/scsi/isci/task.h
@@ -341,64 +341,5 @@ isci_task_set_completion_status(
return task_notification_selection;
}
-/**
- * isci_task_complete_for_upper_layer() - This function completes the request
- * to the upper layer driver.
- * @host: This parameter is a pointer to the host on which the the request
- * should be queued (either as an error or success).
- * @request: This parameter is the completed request.
- * @response: This parameter is the response code for the completed task.
- * @status: This parameter is the status code for the completed task.
- *
- * none.
- */
-static inline void isci_task_complete_for_upper_layer(
- struct sas_task *task,
- enum service_response response,
- enum exec_status status,
- enum isci_completion_selection 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.
- */
- switch (task_notification_selection) {
- case isci_perform_normal_io_completion:
- /* Normal notification (task_done) */
- dev_dbg(task->dev->port->ha->dev,
- "%s: Normal - task = %p, response=%d, status=%d\n",
- __func__, task, response, status);
- task->task_done(task);
- task->lldd_task = NULL;
- break;
-
- case isci_perform_aborted_io_completion:
- /* No notification because this request is already in the
- * abort path.
- */
- dev_warn(task->dev->port->ha->dev,
- "%s: Aborted - task = %p, response=%d, status=%d\n",
- __func__, task, response, status);
- break;
-
- case isci_perform_error_io_completion:
- /* Use sas_task_abort */
- dev_warn(task->dev->port->ha->dev,
- "%s: Error - task = %p, response=%d, status=%d\n",
- __func__, task, response, status);
- sas_task_abort(task);
- break;
-
- default:
- dev_warn(task->dev->port->ha->dev,
- "%s: isci task notification default case!",
- __func__);
- sas_task_abort(task);
- break;
- }
-}
#endif /* !defined(_SCI_TASK_H_) */