))
/**
- * 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
))
/**
- * 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;
+ + scic_ssp_io_request_get_object_size();
}
/**
sci_req->response_buffer =
scic_sds_ssp_request_get_response_buffer(sci_req);
- if (sci_req->was_tag_assigned_by_user == false) {
- sci_req->task_context_buffer =
- scic_sds_ssp_request_get_task_context_buffer(sci_req);
- sci_req->task_context_buffer =
- PTR_ALIGN(sci_req->task_context_buffer,
- SMP_CACHE_BYTES);
- }
+ if (sci_req->was_tag_assigned_by_user == false)
+ sci_req->task_context_buffer = &sci_req->tc;
}
static void scic_sds_io_request_build_ssp_command_iu(struct scic_sds_request *sci_req)
sci_req->response_buffer =
scic_sds_ssp_task_request_get_response_buffer(sci_req);
- if (sci_req->was_tag_assigned_by_user == false) {
- sci_req->task_context_buffer =
- scic_sds_ssp_task_request_get_task_context_buffer(sci_req);
- sci_req->task_context_buffer =
- PTR_ALIGN(sci_req->task_context_buffer, SMP_CACHE_BYTES);
- }
+ if (sci_req->was_tag_assigned_by_user == false)
+ sci_req->task_context_buffer = &sci_req->tc;
}
/**
void *command_buffer;
void *response_buffer;
struct scu_task_context *task_context_buffer;
+ struct scu_task_context tc ____cacheline_aligned;
/* could be larger with sg chaining */
#define SCU_SGL_SIZE ((SCU_IO_REQUEST_SGE_COUNT + 1) / 2)
{
return sizeof(struct scic_sds_request)
+ sizeof(struct smp_req)
- + sizeof(struct smp_resp)
- + sizeof(struct scu_task_context)
- + SMP_CACHE_BYTES;
+ + sizeof(struct smp_resp);
}
/**
(((char *)(scic_sds_smp_request_get_command_buffer(memory))) \
+ sizeof(struct smp_req))
-/**
- * scic_sds_smp_request_get_task_context_buffer() -
- *
- * This macro returs the task context buffer for the SMP request.
- */
-#define scic_sds_smp_request_get_task_context_buffer(memory) \
- ((struct scu_task_context *)(\
- ((char *)(scic_sds_smp_request_get_response_buffer(memory))) \
- + sizeof(struct smp_resp) \
- ))
-
-
-
-/**
- * This method build the remainder of the IO request object.
- * @sci_req: This parameter specifies the request object being constructed.
- *
- * The scic_sds_general_request_construct() must be called before this call is
- * valid. none
- */
-
-void scic_sds_smp_request_assign_buffers(
- struct scic_sds_request *sci_req)
+void scic_sds_smp_request_assign_buffers(struct scic_sds_request *sci_req)
{
/* Assign all of the buffer pointers */
sci_req->command_buffer =
sci_req->response_buffer =
scic_sds_smp_request_get_response_buffer(sci_req);
- if (sci_req->was_tag_assigned_by_user == false) {
- sci_req->task_context_buffer =
- scic_sds_smp_request_get_task_context_buffer(sci_req);
- sci_req->task_context_buffer =
- PTR_ALIGN(sci_req->task_context_buffer, SMP_CACHE_BYTES);
- }
-
+ if (sci_req->was_tag_assigned_by_user == false)
+ sci_req->task_context_buffer = &sci_req->tc;
}
/*
))
/**
- * scic_sds_stp_request_get_task_context_buffer() -
- *
- * This macro returns the address of the task context buffer in the io request
- * memory
- */
-#define scic_sds_stp_request_get_task_context_buffer(memory) \
- ((struct scu_task_context *)(\
- ((char *)(scic_sds_stp_request_get_response_buffer(memory))) \
- + SSP_RESP_IU_MAX_SIZE \
- ))
-
-/**
*
*
* This method return the memory space required for STP PIO requests. u32
{
return sizeof(struct scic_sds_stp_request)
+ sizeof(struct host_to_dev_fis)
- + sizeof(struct dev_to_host_fis)
- + sizeof(struct scu_task_context)
- + SMP_CACHE_BYTES;
+ + sizeof(struct dev_to_host_fis);
}
void scic_sds_stp_request_assign_buffers(struct scic_sds_request *sci_req)
sci_req->command_buffer = scic_sds_stp_request_get_h2d_reg_buffer(stp_req);
sci_req->response_buffer = scic_sds_stp_request_get_response_buffer(stp_req);
- if (sci_req->was_tag_assigned_by_user == false) {
- sci_req->task_context_buffer =
- scic_sds_stp_request_get_task_context_buffer(stp_req);
- sci_req->task_context_buffer = PTR_ALIGN(sci_req->task_context_buffer,
- SMP_CACHE_BYTES);
- }
+ if (sci_req->was_tag_assigned_by_user == false)
+ sci_req->task_context_buffer = &sci_req->tc;
}
/**