-/*
- * ****************************************************************************
- * * SCIC SDS IO REQUEST MACROS
- * **************************************************************************** */
-
-/**
- * scic_ssp_io_request_get_object_size() -
- *
- * This macro returns the sizeof memory required to store the an SSP IO
- * request. This does not include the size of the SGL or SCU Task Context
- * memory.
- */
-#define scic_ssp_io_request_get_object_size() \
- (\
- sizeof(struct ssp_cmd_iu) \
- + SSP_RESP_IU_MAX_SIZE \
- )
-
-/**
- * scic_sds_ssp_request_get_command_buffer() -
- *
- * This macro returns the address of the ssp command buffer in the io request
- * memory
- */
-#define scic_sds_ssp_request_get_command_buffer(memory) \
- ((struct ssp_cmd_iu *)(\
- ((char *)(memory)) + sizeof(struct scic_sds_request) \
- ))
-
-/**
- * scic_sds_ssp_request_get_response_buffer() -
- *
- * This macro returns the address of the ssp response buffer in the io request
- * memory
- */
-#define scic_sds_ssp_request_get_response_buffer(memory) \
- ((struct ssp_response_iu *)(\
- ((char *)(scic_sds_ssp_request_get_command_buffer(memory))) \
- + sizeof(struct ssp_cmd_iu) \
- ))
-
-/**
- * scic_sds_ssp_request_get_task_context_buffer() -
- *
- * This macro returns the address of the task context buffer in the io request
- * memory
- */
-#define scic_sds_ssp_request_get_task_context_buffer(memory) \
- ((struct scu_task_context *)(\
- ((char *)(scic_sds_ssp_request_get_response_buffer(memory))) \
- + SSP_RESP_IU_MAX_SIZE \
- ))
-
-/**
- * scic_sds_ssp_request_get_sgl_element_buffer() -
- *
- * This macro returns the address of the sgl elment pairs in the io request
- * memory buffer
- */
-#define scic_sds_ssp_request_get_sgl_element_buffer(memory) \
- ((struct scu_sgl_element_pair *)(\
- ((char *)(scic_sds_ssp_request_get_task_context_buffer(memory))) \
- + sizeof(struct scu_task_context) \
- ))
-
-
-/**
- * scic_ssp_task_request_get_object_size() -
- *
- * This macro returns the sizeof of memory required to store an SSP Task
- * request. This does not include the size of the SCU Task Context memory.
- */
-#define scic_ssp_task_request_get_object_size() \
- (\
- sizeof(struct ssp_task_iu) \
- + SSP_RESP_IU_MAX_SIZE \
- )
-
-/**
- * scic_sds_ssp_task_request_get_command_buffer() -
- *
- * This macro returns the address of the ssp command buffer in the task request
- * memory. Yes its the same as the above macro except for the name.
- */
-#define scic_sds_ssp_task_request_get_command_buffer(memory) \
- ((struct ssp_task_iu *)(\
- ((char *)(memory)) + sizeof(struct scic_sds_request) \
- ))
-
-/**
- * scic_sds_ssp_task_request_get_response_buffer() -
- *
- * This macro returns the address of the ssp response buffer in the task
- * request memory.
- */
-#define scic_sds_ssp_task_request_get_response_buffer(memory) \
- ((struct ssp_response_iu *)(\
- ((char *)(scic_sds_ssp_task_request_get_command_buffer(memory))) \
- + sizeof(struct ssp_task_iu) \
- ))
-
-/**
- * scic_sds_ssp_task_request_get_task_context_buffer() -
- *
- * This macro returs the task context buffer for the SSP task request.
- */
-#define scic_sds_ssp_task_request_get_task_context_buffer(memory) \
- ((struct scu_task_context *)(\
- ((char *)(scic_sds_ssp_task_request_get_response_buffer(memory))) \
- + SSP_RESP_IU_MAX_SIZE \
- ))
-
-
-
-/*
- * ****************************************************************************
- * * SCIC SDS IO REQUEST PRIVATE METHODS
- * **************************************************************************** */
-
-/**
- *
- *
- * This method returns the size required to store an SSP IO request object. u32
- */
-static u32 scic_sds_ssp_request_get_object_size(void)
-{
- return sizeof(struct scic_sds_request)
- + scic_ssp_io_request_get_object_size()
- + sizeof(struct scu_task_context)
- + SMP_CACHE_BYTES
- + sizeof(struct scu_sgl_element_pair) * SCU_MAX_SGL_ELEMENT_PAIRS;
-}
-