FreeBSD/sys/dev/isci/scil/scic_sds_ssp_request.c
/**
 * @brief This method processes an unsolicited frame while the task mgmt
 *        request is waiting for a response frame.  It will copy the
 *        response data, release the unsolicited frame, and transition
 *        the request to the SCI_BASE_REQUEST_STATE_COMPLETED state.
 *
 * @param[in] this_request This parameter specifies the request for which
 *            the unsolicited frame was received.
 * @param[in] frame_index This parameter indicates the unsolicited frame
 *            index that should contain the response.
 *
 * @return This method returns an indication of whether the TC response
 *         frame was handled successfully or not.
 * @retval SCI_SUCCESS Currently this value is always returned and indicates
 *         successful processing of the TC response.
 *
 * @todo Should probably update to check frame type and make sure it is
 *       a response frame.
 */
@brief This method processes an unsolicited frame while the task mgmt
request is waiting for a response frame.  It will copy the
response data, release the unsolicited frame, and transition
the request to the SCI_BASE_REQUEST_STATE_COMPLETED state.

@param[in] this_request This parameter specifies the request for which
the unsolicited frame was received.
@param[in] frame_index This parameter indicates the unsolicited frame
index that should contain the response.

@return This method returns an indication of whether the TC response
frame was handled successfully or not.
@retval SCI_SUCCESS Currently this value is always returned and indicates
successful processing of the TC response.

@todo Should probably update to check frame type and make sure it is
a response frame.
@brief This method processes an unsolicited frame while the task mgmt request is waiting for a response frame . It will copy the response data release the unsolicited frame and transition the request to the SCI_BASE_REQUEST_STATE_COMPLETED state . @param [ in ] this_request This parameter specifies the request for which the unsolicited frame was received . @param [ in ] frame_index This parameter indicates the unsolicited frame index that should contain the response . @return This method returns an indication of whether the TC response frame was handled successfully or not . @retval SCI_SUCCESS Currently this value is always returned and indicates successful processing of the TC response . @todo Should probably update to check frame type and make sure it is a response frame .
static
SCI_STATUS scic_sds_ssp_task_request_await_tc_response_frame_handler(
   SCIC_SDS_REQUEST_T * this_request,
   U32                  frame_index
)
{
   SCIC_SDS_CONTROLLER_T * owning_controller = this_request->owning_controller;
   SCIC_LOG_TRACE((
      sci_base_object_get_logger(this_request),
      SCIC_LOG_OBJECT_TASK_MANAGEMENT,
      "scic_sds_ssp_task_request_await_tc_response_frame_handler(0x%x, 0x%x) enter\n",
      this_request, frame_index
   ));
   scic_sds_io_request_copy_response(this_request);
   sci_base_state_machine_change_state(
      &this_request->parent.state_machine,
      SCI_BASE_REQUEST_STATE_COMPLETED
   );
   scic_sds_controller_release_frame(
      owning_controller, frame_index
   );
   return SCI_SUCCESS;
}
static SCI_STATUS scic_sds_ssp_task_request_await_tc_response_frame_handler ( SCIC_SDS_REQUEST_T * this_request , U32 frame_index ) { SCIC_SDS_CONTROLLER_T * owning_controller = this_request -> owning_controller ; SCIC_LOG_TRACE ( ( sci_base_object_get_logger ( this_request ) , SCIC_LOG_OBJECT_TASK_MANAGEMENT , " \n " , this_request , frame_index ) ) ; scic_sds_io_request_copy_response ( this_request ) ; sci_base_state_machine_change_state ( & this_request -> parent . state_machine , SCI_BASE_REQUEST_STATE_COMPLETED ) ; scic_sds_controller_release_frame ( owning_controller , frame_index ) ; return SCI_SUCCESS ; }
@brief This method processes an unsolicited frame while the task mgmt
        request is waiting for a response frame.
@brief This method processes an unsolicited frame while the task mgmt request is waiting for a response frame .
// Save off the controller, so that we do not touch the request after it //  is completed.