FreeBSD/sys/dev/isci/scil/scif_sas_smp_io_request.c
void * scif_sas_smp_request_construct_discover(
   SCIF_SAS_CONTROLLER_T    * fw_controller,
   SCIF_SAS_REMOTE_DEVICE_T * fw_device,
   U8                         phy_identifier,
   void                     * external_request_object,
   void                     * external_memory
)
{
   SMP_REQUEST_T smp_discover;

   scif_sas_smp_protocol_request_construct(
      &smp_discover,
      SMP_FUNCTION_DISCOVER,
      sizeof(SMP_RESPONSE_DISCOVER_T) / sizeof(U32),
      sizeof(SMP_REQUEST_PHY_IDENTIFIER_T) / sizeof(U32)
   );

   smp_discover.request.discover.phy_identifier = phy_identifier;

   SCIF_LOG_INFO((
      sci_base_object_get_logger(fw_device),
      SCIF_LOG_OBJECT_IO_REQUEST | SCIF_LOG_OBJECT_DOMAIN_DISCOVERY,
      "SMP DISCOVER - Device:0x%x PhyId:0x%x\n",
      fw_device, phy_identifier
   ));

   return scif_sas_smp_request_build(
             fw_controller, fw_device, &smp_discover,
             external_request_object, external_memory
          );
}
/**
 * @brief construct a smp Discover command to the fw_device.
 * @param[in] fw_controller The framework controller object.
 * @param[in] fw_device the framework smp device that DISCOVER command targets
 *       to.
 * @param[in] phy_identifier The phy index the DISCOVER command targets to.
 *
 * @return void * address to the built scif sas smp request.
 */
@brief construct a smp Discover command to the fw_device.
@param[in] fw_controller The framework controller object.
@param[in] fw_device the framework smp device that DISCOVER command targets
to.
@param[in] phy_identifier The phy index the DISCOVER command targets to.

@return void * address to the built scif sas smp request.
@brief construct a smp Discover command to the fw_device . @param [ in ] fw_controller The framework controller object . @param [ in ] fw_device the framework smp device that DISCOVER command targets to . @param [ in ] phy_identifier The phy index the DISCOVER command targets to . @return void * address to the built scif sas smp request .
void * scif_sas_smp_request_construct_discover(
   SCIF_SAS_CONTROLLER_T    * fw_controller,
   SCIF_SAS_REMOTE_DEVICE_T * fw_device,
   U8                         phy_identifier,
   void                     * external_request_object,
   void                     * external_memory
)
{
   SMP_REQUEST_T smp_discover;
   scif_sas_smp_protocol_request_construct(
      &smp_discover,
      SMP_FUNCTION_DISCOVER,
      sizeof(SMP_RESPONSE_DISCOVER_T) / sizeof(U32),
      sizeof(SMP_REQUEST_PHY_IDENTIFIER_T) / sizeof(U32)
   );
   smp_discover.request.discover.phy_identifier = phy_identifier;
   SCIF_LOG_INFO((
      sci_base_object_get_logger(fw_device),
      SCIF_LOG_OBJECT_IO_REQUEST | SCIF_LOG_OBJECT_DOMAIN_DISCOVERY,
      "SMP DISCOVER - Device:0x%x PhyId:0x%x\n",
      fw_device, phy_identifier
   ));
   return scif_sas_smp_request_build(
             fw_controller, fw_device, &smp_discover,
             external_request_object, external_memory
          );
}
void * scif_sas_smp_request_construct_discover ( SCIF_SAS_CONTROLLER_T * fw_controller , SCIF_SAS_REMOTE_DEVICE_T * fw_device , U8 phy_identifier , void * external_request_object , void * external_memory ) { SMP_REQUEST_T smp_discover ; scif_sas_smp_protocol_request_construct ( & smp_discover , SMP_FUNCTION_DISCOVER , sizeof ( SMP_RESPONSE_DISCOVER_T ) / sizeof ( U32 ) , sizeof ( SMP_REQUEST_PHY_IDENTIFIER_T ) / sizeof ( U32 ) ) ; smp_discover . request . discover . phy_identifier = phy_identifier ; SCIF_LOG_INFO ( ( sci_base_object_get_logger ( fw_device ) , SCIF_LOG_OBJECT_IO_REQUEST | SCIF_LOG_OBJECT_DOMAIN_DISCOVERY , " \n " , fw_device , phy_identifier ) ) ; return scif_sas_smp_request_build ( fw_controller , fw_device , & smp_discover , external_request_object , external_memory ) ; }
@brief construct a smp Discover command to the fw_device.
@brief construct a smp Discover command to the fw_device .