提交 9286a195 编写于 作者: D Dave Jiang 提交者: Dan Williams

isci: Removing unnecessary functions in request.c

No need for wrappers, just access sas_task directly.
Signed-off-by: NDave Jiang <dave.jiang@intel.com>
Signed-off-by: NDan Williams <dan.j.williams@intel.com>
上级 cc3dbd0a
......@@ -666,19 +666,20 @@ u32 scic_io_request_get_object_size(void)
enum sci_status scic_io_request_construct_basic_ssp(
struct scic_sds_request *sci_req)
{
struct isci_request *isci_request = sci_req->ireq;
struct isci_request *ireq = sci_req->ireq;
struct sas_task *task = isci_request_access_task(ireq);
sci_req->protocol = SCIC_SSP_PROTOCOL;
scu_ssp_io_request_construct_task_context(
sci_req,
isci_request_io_request_get_data_direction(isci_request),
isci_request_io_request_get_transfer_length(isci_request));
scu_ssp_io_request_construct_task_context(sci_req,
task->data_dir,
task->total_xfer_len);
scic_sds_io_request_build_ssp_command_iu(sci_req);
sci_base_state_machine_change_state(&sci_req->state_machine,
SCI_BASE_REQUEST_STATE_CONSTRUCTED);
sci_base_state_machine_change_state(
&sci_req->state_machine,
SCI_BASE_REQUEST_STATE_CONSTRUCTED);
return SCI_SUCCESS;
}
......@@ -705,8 +706,6 @@ enum sci_status scic_io_request_construct_basic_sata(
{
enum sci_status status;
struct scic_sds_stp_request *stp_req;
u32 len;
enum dma_data_direction dir;
bool copy = false;
struct isci_request *isci_request = sci_req->ireq;
struct sas_task *task = isci_request_access_task(isci_request);
......@@ -715,11 +714,12 @@ enum sci_status scic_io_request_construct_basic_sata(
sci_req->protocol = SCIC_STP_PROTOCOL;
len = isci_request_io_request_get_transfer_length(isci_request);
dir = isci_request_io_request_get_data_direction(isci_request);
copy = (task->data_dir == DMA_NONE) ? false : true;
status = scic_io_request_construct_sata(sci_req, len, dir, copy);
status = scic_io_request_construct_sata(sci_req,
task->total_xfer_len,
task->data_dir,
copy);
if (status == SCI_SUCCESS)
sci_base_state_machine_change_state(&sci_req->state_machine,
......
......@@ -1197,37 +1197,3 @@ void isci_request_io_request_complete(
isci_host_can_dequeue(isci_host, 1);
}
/**
* isci_request_io_request_get_transfer_length() - This function is called by
* the sci core to retrieve the transfer length for a given request.
* @request: This parameter is the isci_request object.
*
* length of transfer for specified request.
*/
u32 isci_request_io_request_get_transfer_length(struct isci_request *request)
{
struct sas_task *task = isci_request_access_task(request);
dev_dbg(&request->isci_host->pdev->dev,
"%s: total_xfer_len: %d\n",
__func__,
task->total_xfer_len);
return task->total_xfer_len;
}
/**
* isci_request_io_request_get_data_direction() - This function is called by
* the sci core to retrieve the data direction for a given request.
* @request: This parameter is the isci_request object.
*
* data direction for specified request.
*/
enum dma_data_direction isci_request_io_request_get_data_direction(
struct isci_request *request)
{
struct sas_task *task = isci_request_access_task(request);
return task->data_dir;
}
......@@ -343,11 +343,6 @@ void isci_request_io_request_complete(
struct isci_request *request,
enum sci_io_status completion_status);
u32 isci_request_io_request_get_transfer_length(
struct isci_request *request);
enum dma_data_direction isci_request_io_request_get_data_direction(struct isci_request *req);
/**
* isci_request_io_request_get_next_sge() - This function is called by the sci
* core to retrieve the next sge for a given request.
......@@ -391,26 +386,6 @@ static inline void *isci_request_io_request_get_next_sge(
}
void *isci_request_ssp_io_request_get_cdb_address(
struct isci_request *request);
u32 isci_request_ssp_io_request_get_cdb_length(
struct isci_request *request);
u32 isci_request_ssp_io_request_get_lun(
struct isci_request *request);
u32 isci_request_ssp_io_request_get_task_attribute(
struct isci_request *request);
u32 isci_request_ssp_io_request_get_command_priority(
struct isci_request *request);
void isci_terminate_pending_requests(
struct isci_host *isci_host,
struct isci_remote_device *isci_device,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册