FreeBSD/sys/dev/isci/scil/scif_sas_smp_io_request.c
/**
 * @brief construct a smp CONFIG ROUTE INFO command to the fw_device.
 *
 * @param[in] fw_controller The framework controller object.
 * @param[in] fw_device the framework smp device that PHY CONTROL command
 *       targets to.
 * @param[in] phy_id The phy, whose route entry at route_index is to be configured.
 * @param[in] route_index The index of a phy's route entry that is to be configured.
 * @param[in] destination_sas_address A sas address for an route table entry
 *
 * @return void * address to the built scif sas smp request.
 */
@brief construct a smp CONFIG ROUTE INFO command to the fw_device.
@param[in] fw_controller The framework controller object.
@param[in] fw_device the framework smp device that PHY CONTROL command
targets to.
@param[in] phy_id The phy, whose route entry at route_index is to be configured.
@param[in] route_index The index of a phy's route entry that is to be configured.
@param[in] destination_sas_address A sas address for an route table entry

@return void * address to the built scif sas smp request.
@brief construct a smp CONFIG ROUTE INFO command to the fw_device . @param [ in ] fw_controller The framework controller object . @param [ in ] fw_device the framework smp device that PHY CONTROL command targets to . @param [ in ] phy_id The phy whose route entry at route_index is to be configured . @param [ in ] route_index The index of a phy ' s route entry that is to be configured . @param [ in ] destination_sas_address A sas address for an route table entry @return void * address to the built scif sas smp request .
void * scif_sas_smp_request_construct_config_route_info(
   struct SCIF_SAS_CONTROLLER    * fw_controller,
   struct SCIF_SAS_REMOTE_DEVICE * fw_device,
   U8                              phy_id,
   U16                             route_index,
   SCI_SAS_ADDRESS_T               destination_sas_address,
   BOOL                            disable_expander_route_entry
)
{
   SMP_REQUEST_T config_route_info;
   scif_sas_smp_protocol_request_construct(
      &config_route_info,
      SMP_FUNCTION_CONFIGURE_ROUTE_INFORMATION,
      0,
      sizeof(SMP_REQUEST_CONFIGURE_ROUTE_INFORMATION_T) / sizeof(U32)
   );
   config_route_info.request.configure_route_information.phy_identifier = phy_id;
   config_route_info.request.configure_route_information.expander_route_index_high =
      ((route_index & 0xff00) >> 8);
   config_route_info.request.configure_route_information.expander_route_index =
      route_index & 0xff;
   config_route_info.request.configure_route_information.routed_sas_address[0] =
      destination_sas_address.high;
   config_route_info.request.configure_route_information.routed_sas_address[1] =
      destination_sas_address.low;
   if (disable_expander_route_entry == TRUE)
      config_route_info.request.configure_route_information.disable_route_entry = 1;
   return scif_sas_smp_request_build(
             fw_controller, fw_device, &config_route_info,
             NULL, NULL
          );
}
void * scif_sas_smp_request_construct_config_route_info ( struct SCIF_SAS_CONTROLLER * fw_controller , struct SCIF_SAS_REMOTE_DEVICE * fw_device , U8 phy_id , U16 route_index , SCI_SAS_ADDRESS_T destination_sas_address , BOOL disable_expander_route_entry ) { SMP_REQUEST_T config_route_info ; scif_sas_smp_protocol_request_construct ( & config_route_info , SMP_FUNCTION_CONFIGURE_ROUTE_INFORMATION , 0 , sizeof ( SMP_REQUEST_CONFIGURE_ROUTE_INFORMATION_T ) / sizeof ( U32 ) ) ; config_route_info . request . configure_route_information . phy_identifier = phy_id ; config_route_info . request . configure_route_information . expander_route_index_high = ( ( route_index & 0xff00 ) >> 8 ) ; config_route_info . request . configure_route_information . expander_route_index = route_index & 0xff ; config_route_info . request . configure_route_information . routed_sas_address [ 0 ] = destination_sas_address . high ; config_route_info . request . configure_route_information . routed_sas_address [ 1 ] = destination_sas_address . low ; if ( disable_expander_route_entry == TRUE ) config_route_info . request . configure_route_information . disable_route_entry = 1 ; return scif_sas_smp_request_build ( fw_controller , fw_device , & config_route_info , NULL , NULL ) ; }
@brief construct a smp CONFIG ROUTE INFO command to the fw_device.
@brief construct a smp CONFIG ROUTE INFO command to the fw_device .