FreeBSD/sys/dev/isci/scil/scif_sas_smp_io_request.c
/**
 * @brief This method will perform all of the construction common to all
 *        SMP requests (e.g. filling in the frame type, zero-out memory,
 *        etc.).
 *
 * @param[out] smp_request This parameter specifies the SMP request
 *             structure containing the SMP request to be sent to the
 *             SMP target.
 * @param[in]  smp_function This parameter specifies the SMP function to
 *             sent.
 * @param[in]  smp_response_length This parameter specifies the length of
 *             the response (in DWORDs) that will be returned for this
 *             SMP request.
 * @param[in]  smp_request_length This parameter specifies the length of
 *             the request (in DWORDs) that will be sent.
 */
@brief This method will perform all of the construction common to all
SMP requests .

@param[out] smp_request This parameter specifies the SMP request
structure containing the SMP request to be sent to the
SMP target.
@param[in]  smp_function This parameter specifies the SMP function to
sent.
@param[in]  smp_response_length This parameter specifies the length of
the response (in DWORDs) that will be returned for this
SMP request.
@param[in]  smp_request_length This parameter specifies the length of
the request (in DWORDs) that will be sent.
@brief This method will perform all of the construction common to all SMP requests . @param [ out ] smp_request This parameter specifies the SMP request structure containing the SMP request to be sent to the SMP target . @param [ in ] smp_function This parameter specifies the SMP function to sent . @param [ in ] smp_response_length This parameter specifies the length of the response ( in DWORDs ) that will be returned for this SMP request . @param [ in ] smp_request_length This parameter specifies the length of the request ( in DWORDs ) that will be sent .
static
void scif_sas_smp_protocol_request_construct(
   SMP_REQUEST_T * smp_request,
   U8              smp_function,
   U8              smp_response_length,
   U8              smp_request_length
)
{
   memset((char*)smp_request, 0, sizeof(SMP_REQUEST_T));
   smp_request->header.smp_frame_type            = SMP_FRAME_TYPE_REQUEST;
   smp_request->header.function                  = smp_function;
   smp_request->header.allocated_response_length = smp_response_length;
   smp_request->header.request_length            = smp_request_length;
}
static void scif_sas_smp_protocol_request_construct ( SMP_REQUEST_T * smp_request , U8 smp_function , U8 smp_response_length , U8 smp_request_length ) { memset ( ( char * ) smp_request , 0 , sizeof ( SMP_REQUEST_T ) ) ; smp_request -> header . smp_frame_type = SMP_FRAME_TYPE_REQUEST ; smp_request -> header . function = smp_function ; smp_request -> header . allocated_response_length = smp_response_length ; smp_request -> header . request_length = smp_request_length ; }
@brief This method will perform all of the construction common to all
        SMP requests (e.g.
@brief This method will perform all of the construction common to all SMP requests ( e . g .