/** * @brief This user callback will inform the user that a task management * request completed. * * @param[in] controller This parameter specifies the controller on * which the task management request is completing. * @param[in] remote_device This parameter specifies the remote device on * which this task management request is completing. * @param[in] task_request This parameter specifies the task management * request that has completed. * @param[in] completion_status This parameter specifies the results of * the IO request operation. SCI_TASK_SUCCESS indicates * successful completion. * * @return none */ void scif_cb_task_request_complete(SCI_CONTROLLER_HANDLE_T controller, SCI_REMOTE_DEVICE_HANDLE_T remote_device, SCI_TASK_REQUEST_HANDLE_T task_request, SCI_TASK_STATUS completion_status) { scif_controller_complete_task(controller, remote_device, task_request); isci_task_request_complete(controller, remote_device, task_request, completion_status); }
void scic_cb_task_request_complete( SCI_CONTROLLER_HANDLE_T controller, SCI_REMOTE_DEVICE_HANDLE_T remote_device, SCI_TASK_REQUEST_HANDLE_T task_request, SCI_TASK_STATUS completion_status ) { SCIF_SAS_CONTROLLER_T * fw_controller = (SCIF_SAS_CONTROLLER_T*) sci_object_get_association(controller); SCIF_SAS_REMOTE_DEVICE_T * fw_device = (SCIF_SAS_REMOTE_DEVICE_T*) sci_object_get_association(remote_device); SCIF_SAS_TASK_REQUEST_T * fw_task = (SCIF_SAS_TASK_REQUEST_T*) sci_object_get_association(task_request); SCI_STATUS status; SCIF_LOG_TRACE(( sci_base_object_get_logger(fw_controller), SCIF_LOG_OBJECT_TASK_MANAGEMENT, "scic_cb_task_request_complete(0x%x, 0x%x, 0x%x, 0x%x) enter\n", controller, remote_device, task_request, completion_status )); status = fw_task->parent.state_handlers->complete_handler( &fw_task->parent.parent ); if (status == SCI_SUCCESS) { if (fw_task->parent.protocol_complete_handler != NULL) { status = fw_task->parent.protocol_complete_handler( fw_controller, fw_device, &fw_task->parent, (SCI_STATUS *)&completion_status ); } if (status == SCI_SUCCESS) { SCIF_LOG_WARNING(( sci_base_object_get_logger(fw_task), SCIF_LOG_OBJECT_TASK_MANAGEMENT, "RemoteDevice:0x%x TaskRequest:0x%x Function:0x%x CompletionStatus:0x%x " "completed\n", fw_device, fw_task, scif_sas_task_request_get_function(fw_task), completion_status )); // If this isn't an internal framework IO request, then simply pass the // notification up to the SCIF user. Otherwise, immediately complete the // task since there is no SCIF user to notify. if (fw_task->parent.is_internal == FALSE) { scif_cb_task_request_complete( fw_controller, fw_device, fw_task, completion_status ); } else { scif_controller_complete_task( fw_controller, fw_device, fw_task ); } } } }