FreeBSD/sys/dev/isci/scil/scic_sds_controller.c
/**
 * This method processes an unsolicited frame message.  This is called from
 * within the controller completion handler.
 *
 * @param[in] this_controller
 * @param[in] completion_entry
 *
 * @return none
 */
This method processes an unsolicited frame message.  This is called from
within the controller completion handler.



@return none
This method processes an unsolicited frame message . This is called from within the controller completion handler . @return none
static
void scic_sds_controller_unsolicited_frame(
   SCIC_SDS_CONTROLLER_T *this_controller,
   U32                   completion_entry
)
{
   U32 index;
   U32 frame_index;
   SCU_UNSOLICITED_FRAME_HEADER_T * frame_header;
   SCIC_SDS_PHY_T                 * phy;
   SCIC_SDS_REMOTE_DEVICE_T       * device;
   SCI_STATUS result = SCI_FAILURE;
   frame_index = SCU_GET_FRAME_INDEX(completion_entry);
   frame_header
      = this_controller->uf_control.buffers.array[frame_index].header;
   this_controller->uf_control.buffers.array[frame_index].state
      = UNSOLICITED_FRAME_IN_USE;
   if (SCU_GET_FRAME_ERROR(completion_entry))
   {
      scic_sds_controller_release_frame(this_controller, frame_index);
      return;
   }
   if (frame_header->is_address_frame)
   {
      index = SCU_GET_PROTOCOL_ENGINE_INDEX(completion_entry);
      phy = &this_controller->phy_table[index];
      if (phy != NULL)
      {
         result = scic_sds_phy_frame_handler(phy, frame_index);
      }
   }
   else
   {
      index = SCU_GET_COMPLETION_INDEX(completion_entry);
      if (index == SCIC_SDS_REMOTE_NODE_CONTEXT_INVALID_INDEX)
      {
         index = SCU_GET_PROTOCOL_ENGINE_INDEX(completion_entry);
         phy = &this_controller->phy_table[index];
         result = scic_sds_phy_frame_handler(phy, frame_index);
      }
      else
      {
         if (index < this_controller->remote_node_entries)
            device = this_controller->device_table[index];
         else
            device = NULL;
         if (device != NULL)
            result = scic_sds_remote_device_frame_handler(device, frame_index);
         else
            scic_sds_controller_release_frame(this_controller, frame_index);
      }
   }
   if (result != SCI_SUCCESS)
   {
   }
}
static void scic_sds_controller_unsolicited_frame ( SCIC_SDS_CONTROLLER_T * this_controller , U32 completion_entry ) { U32 index ; U32 frame_index ; SCU_UNSOLICITED_FRAME_HEADER_T * frame_header ; SCIC_SDS_PHY_T * phy ; SCIC_SDS_REMOTE_DEVICE_T * device ; SCI_STATUS result = SCI_FAILURE ; frame_index = SCU_GET_FRAME_INDEX ( completion_entry ) ; frame_header = this_controller -> uf_control . buffers . array [ frame_index ] . header ; this_controller -> uf_control . buffers . array [ frame_index ] . state = UNSOLICITED_FRAME_IN_USE ; if ( SCU_GET_FRAME_ERROR ( completion_entry ) ) { scic_sds_controller_release_frame ( this_controller , frame_index ) ; return ; } if ( frame_header -> is_address_frame ) { index = SCU_GET_PROTOCOL_ENGINE_INDEX ( completion_entry ) ; phy = & this_controller -> phy_table [ index ] ; if ( phy != NULL ) { result = scic_sds_phy_frame_handler ( phy , frame_index ) ; } } else { index = SCU_GET_COMPLETION_INDEX ( completion_entry ) ; if ( index == SCIC_SDS_REMOTE_NODE_CONTEXT_INVALID_INDEX ) { index = SCU_GET_PROTOCOL_ENGINE_INDEX ( completion_entry ) ; phy = & this_controller -> phy_table [ index ] ; result = scic_sds_phy_frame_handler ( phy , frame_index ) ; } else { if ( index < this_controller -> remote_node_entries ) device = this_controller -> device_table [ index ] ; else device = NULL ; if ( device != NULL ) result = scic_sds_remote_device_frame_handler ( device , frame_index ) ; else scic_sds_controller_release_frame ( this_controller , frame_index ) ; } } if ( result != SCI_SUCCESS ) { } }
This method processes an unsolicited frame message.
This method processes an unsolicited frame message .
/// @todo If the IAF frame or SIGNATURE FIS frame has an error will ///       this cause a problem? We expect the phy initialization will ///       fail if there is an error in the frame. // This is a signature fis or a frame from a direct attached SATA // device that has not yet been created.  In either case forwared // the frame to the PE and let it take care of the frame data. /// @todo Is there any reason to report some additional error message ///       when we get this failure notifiction?