Commit 9286a195 authored by Dave Jiang's avatar Dave Jiang Committed by Dan Williams

isci: Removing unnecessary functions in request.c

No need for wrappers, just access sas_task directly.
Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent cc3dbd0a
...@@ -666,19 +666,20 @@ u32 scic_io_request_get_object_size(void) ...@@ -666,19 +666,20 @@ u32 scic_io_request_get_object_size(void)
enum sci_status scic_io_request_construct_basic_ssp( enum sci_status scic_io_request_construct_basic_ssp(
struct scic_sds_request *sci_req) 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; sci_req->protocol = SCIC_SSP_PROTOCOL;
scu_ssp_io_request_construct_task_context( scu_ssp_io_request_construct_task_context(sci_req,
sci_req, task->data_dir,
isci_request_io_request_get_data_direction(isci_request), task->total_xfer_len);
isci_request_io_request_get_transfer_length(isci_request));
scic_sds_io_request_build_ssp_command_iu(sci_req); scic_sds_io_request_build_ssp_command_iu(sci_req);
sci_base_state_machine_change_state(&sci_req->state_machine, sci_base_state_machine_change_state(
SCI_BASE_REQUEST_STATE_CONSTRUCTED); &sci_req->state_machine,
SCI_BASE_REQUEST_STATE_CONSTRUCTED);
return SCI_SUCCESS; return SCI_SUCCESS;
} }
...@@ -705,8 +706,6 @@ enum sci_status scic_io_request_construct_basic_sata( ...@@ -705,8 +706,6 @@ enum sci_status scic_io_request_construct_basic_sata(
{ {
enum sci_status status; enum sci_status status;
struct scic_sds_stp_request *stp_req; struct scic_sds_stp_request *stp_req;
u32 len;
enum dma_data_direction dir;
bool copy = false; bool copy = false;
struct isci_request *isci_request = sci_req->ireq; struct isci_request *isci_request = sci_req->ireq;
struct sas_task *task = isci_request_access_task(isci_request); struct sas_task *task = isci_request_access_task(isci_request);
...@@ -715,11 +714,12 @@ enum sci_status scic_io_request_construct_basic_sata( ...@@ -715,11 +714,12 @@ enum sci_status scic_io_request_construct_basic_sata(
sci_req->protocol = SCIC_STP_PROTOCOL; 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; 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) if (status == SCI_SUCCESS)
sci_base_state_machine_change_state(&sci_req->state_machine, sci_base_state_machine_change_state(&sci_req->state_machine,
......
...@@ -1197,37 +1197,3 @@ void isci_request_io_request_complete( ...@@ -1197,37 +1197,3 @@ void isci_request_io_request_complete(
isci_host_can_dequeue(isci_host, 1); 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( ...@@ -343,11 +343,6 @@ void isci_request_io_request_complete(
struct isci_request *request, struct isci_request *request,
enum sci_io_status completion_status); 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 * isci_request_io_request_get_next_sge() - This function is called by the sci
* core to retrieve the next sge for a given request. * core to retrieve the next sge for a given request.
...@@ -391,26 +386,6 @@ static inline void *isci_request_io_request_get_next_sge( ...@@ -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( void isci_terminate_pending_requests(
struct isci_host *isci_host, struct isci_host *isci_host,
struct isci_remote_device *isci_device, struct isci_remote_device *isci_device,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment