FreeBSD/sys/dev/isci/isci_io_request.c
/**
 * @brief This callback method gets the size of and pointer to the buffer
 *         (if any) containing the request buffer for an SMP request.
 *
 * @param[in]  core_request This parameter specifies the SCI core's request
 *             object associated with the SMP request.
 * @param[out] smp_request_buffer This parameter returns a pointer to the
 *             payload portion of the SMP request - i.e. everything after
 *             the SMP request header.
 *
 * @return Size of the request buffer in bytes.  This does *not* include
 *          the size of the SMP request header.
 */
@brief This callback method gets the size of and pointer to the buffer
(if any) containing the request buffer for an SMP request.

@param[in]  core_request This parameter specifies the SCI core's request
object associated with the SMP request.
@param[out] smp_request_buffer This parameter returns a pointer to the
payload portion of the SMP request - i.e. everything after
the SMP request header.

@return Size of the request buffer in bytes.  This does *not* include
the size of the SMP request header.
@brief This callback method gets the size of and pointer to the buffer ( if any ) containing the request buffer for an SMP request . @param [ in ] core_request This parameter specifies the SCI core ' s request object associated with the SMP request . @param [ out ] smp_request_buffer This parameter returns a pointer to the payload portion of the SMP request - i . e . everything after the SMP request header . @return Size of the request buffer in bytes . This does * not * include the size of the SMP request header .
static uint32_t
smp_io_request_cb_get_request_buffer(SCI_IO_REQUEST_HANDLE_T core_request,
    uint8_t ** smp_request_buffer)
{
	struct ISCI_IO_REQUEST *isci_request = (struct ISCI_IO_REQUEST *)
	    sci_object_get_association(sci_object_get_association(core_request));
	*smp_request_buffer = isci_request->ccb->smpio.smp_request +
	    sizeof(SMP_REQUEST_HEADER_T);
	return (isci_request->ccb->smpio.smp_request_len -
	    sizeof(SMP_REQUEST_HEADER_T));
}
static uint32_t smp_io_request_cb_get_request_buffer ( SCI_IO_REQUEST_HANDLE_T core_request , uint8_t * * smp_request_buffer ) { struct ISCI_IO_REQUEST * isci_request = ( struct ISCI_IO_REQUEST * ) sci_object_get_association ( sci_object_get_association ( core_request ) ) ; * smp_request_buffer = isci_request -> ccb -> smpio . smp_request + sizeof ( SMP_REQUEST_HEADER_T ) ; return ( isci_request -> ccb -> smpio . smp_request_len - sizeof ( SMP_REQUEST_HEADER_T ) ) ; }
@brief This callback method gets the size of and pointer to the buffer
         (if any) containing the request buffer for an SMP request.
@brief This callback method gets the size of and pointer to the buffer ( if any ) containing the request buffer for an SMP request .