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;
+ + SMP_CACHE_BYTES;
}
/**
return &task_context->sgl_pair_cd;
}
- return &sci_req->sgl_element_pair_buffer[sgl_pair_index - 2];
+ return &sci_req->sg_table[sgl_pair_index - 2];
}
/**
scic_sds_ssp_request_get_command_buffer(sci_req);
sci_req->response_buffer =
scic_sds_ssp_request_get_response_buffer(sci_req);
- sci_req->sgl_element_pair_buffer =
- scic_sds_ssp_request_get_sgl_element_buffer(sci_req);
- sci_req->sgl_element_pair_buffer =
- PTR_ALIGN(sci_req->sgl_element_pair_buffer,
- sizeof(struct scu_sgl_element_pair));
if (sci_req->was_tag_assigned_by_user == false) {
sci_req->task_context_buffer =
scic_sds_ssp_task_request_get_command_buffer(sci_req);
sci_req->response_buffer =
scic_sds_ssp_task_request_get_response_buffer(sci_req);
- sci_req->sgl_element_pair_buffer = NULL;
if (sci_req->was_tag_assigned_by_user == false) {
sci_req->task_context_buffer =
#include "sci_base_state_machine.h"
#include "scu_task_context.h"
#include "scic_sds_stp_request.h"
+#include "scu_constants.h"
struct scic_sds_controller;
struct scic_sds_remote_device;
void *command_buffer;
void *response_buffer;
struct scu_task_context *task_context_buffer;
- struct scu_sgl_element_pair *sgl_element_pair_buffer;
+
+ /* could be larger with sg chaining */
+ #define SCU_SGL_SIZE ((SCU_IO_REQUEST_SGE_COUNT + 1) / 2)
+ struct scu_sgl_element_pair sg_table[SCU_SGL_SIZE] __attribute__ ((aligned(32)));
/**
* This field indicates if this request is a task management request or
extern const struct sci_base_state scic_sds_io_request_started_task_mgmt_substate_table[];
-/**
- *
- *
- * This macro returns the maximum number of SGL element paris that we will
- * support in a single IO request.
- */
-#define SCU_MAX_SGL_ELEMENT_PAIRS ((SCU_IO_REQUEST_SGE_COUNT + 1) / 2)
-
/**
* scic_sds_request_get_controller() -
*
scic_sds_smp_request_get_command_buffer(sci_req);
sci_req->response_buffer =
scic_sds_smp_request_get_response_buffer(sci_req);
- sci_req->sgl_element_pair_buffer = NULL;
if (sci_req->was_tag_assigned_by_user == false) {
sci_req->task_context_buffer =
+ SSP_RESP_IU_MAX_SIZE \
))
-/**
- * scic_sds_stp_request_get_sgl_element_buffer() -
- *
- * This macro returns the address of the sgl elment pairs in the io request
- * memory buffer
- */
-#define scic_sds_stp_request_get_sgl_element_buffer(memory) \
- ((struct scu_sgl_element_pair *)(\
- ((char *)(scic_sds_stp_request_get_task_context_buffer(memory))) \
- + sizeof(struct scu_task_context) \
- ))
-
/**
*
*
+ sizeof(struct host_to_dev_fis)
+ sizeof(struct dev_to_host_fis)
+ sizeof(struct scu_task_context)
- + SMP_CACHE_BYTES
- + sizeof(struct scu_sgl_element_pair) * SCU_MAX_SGL_ELEMENT_PAIRS;
+ + SMP_CACHE_BYTES;
}
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);
- sci_req->sgl_element_pair_buffer = scic_sds_stp_request_get_sgl_element_buffer(stp_req);
- sci_req->sgl_element_pair_buffer = PTR_ALIGN(sci_req->sgl_element_pair_buffer,
- sizeof(struct scu_sgl_element_pair));
if (sci_req->was_tag_assigned_by_user == false) {
sci_req->task_context_buffer =