/** * isci_task_refuse() - complete the request to the upper layer driver in * the case where an I/O needs to be completed back in the submit path. * @ihost: host on which the the request was queued * @task: request to complete * @response: response code for the completed task. * @status: status code for the completed task. * */ static void isci_task_refuse(struct isci_host *ihost, struct sas_task *task, enum service_response response, enum exec_status status) { enum isci_completion_selection disposition; disposition = isci_perform_normal_io_completion; disposition = isci_task_set_completion_status(task, response, status, disposition); /* Tasks aborted specifically by a call to the lldd_abort_task * function should not be completed to the host in the regular path. */ switch (disposition) { case isci_perform_normal_io_completion: /* Normal notification (task_done) */ dev_dbg(&ihost->pdev->dev, "%s: Normal - task = %p, response=%d, " "status=%d\n", __func__, task, response, status); task->lldd_task = NULL; task->task_done(task); break; case isci_perform_aborted_io_completion: /* * No notification because this request is already in the * abort path. */ dev_dbg(&ihost->pdev->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_dbg(&ihost->pdev->dev, "%s: Error - task = %p, response=%d, " "status=%d\n", __func__, task, response, status); sas_task_abort(task); break; default: dev_dbg(&ihost->pdev->dev, "%s: isci task notification default case!", __func__); sas_task_abort(task); break; } }
static void isci_task_refuse(struct isci_host *ihost, struct sas_task *task, enum service_response response, enum exec_status status) { enum isci_completion_selection disposition; disposition = isci_perform_normal_io_completion; disposition = isci_task_set_completion_status(task, response, status, disposition); switch (disposition) { case isci_perform_normal_io_completion: dev_dbg(&ihost->pdev->dev, "%s: Normal - task = %p, response=%d, " "status=%d\n", __func__, task, response, status); task->lldd_task = NULL; task->task_done(task); break; case isci_perform_aborted_io_completion: dev_dbg(&ihost->pdev->dev, "%s: Aborted - task = %p, response=%d, " "status=%d\n", __func__, task, response, status); break; case isci_perform_error_io_completion: dev_dbg(&ihost->pdev->dev, "%s: Error - task = %p, response=%d, " "status=%d\n", __func__, task, response, status); sas_task_abort(task); break; default: dev_dbg(&ihost->pdev->dev, "%s: isci task notification default case!", __func__); sas_task_abort(task); break; } }