diff options
author | Dave Jiang <dave.jiang@intel.com> | 2011-05-06 02:17:37 +0000 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 04:04:46 -0700 |
commit | 9286a1959ce7f3df3c1a8e33eb9b210078318dc8 (patch) | |
tree | 6d4b1e3d757f2f7598f4fbe97bc0c3572eecce94 /drivers | |
parent | cc3dbd0a9178865d4444f8e28b51715808e9ac85 (diff) | |
download | blackbird-op-linux-9286a1959ce7f3df3c1a8e33eb9b210078318dc8.tar.gz blackbird-op-linux-9286a1959ce7f3df3c1a8e33eb9b210078318dc8.zip |
isci: Removing unnecessary functions in request.c
No need for wrappers, just access sas_task directly.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_request.c | 24 | ||||
-rw-r--r-- | drivers/scsi/isci/request.c | 34 | ||||
-rw-r--r-- | drivers/scsi/isci/request.h | 25 |
3 files changed, 12 insertions, 71 deletions
diff --git a/drivers/scsi/isci/core/scic_sds_request.c b/drivers/scsi/isci/core/scic_sds_request.c index 6286decd62e5..52692a16449d 100644 --- a/drivers/scsi/isci/core/scic_sds_request.c +++ b/drivers/scsi/isci/core/scic_sds_request.c @@ -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, diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index 0521c045d43b..e01c2c98f4e9 100644 --- a/drivers/scsi/isci/request.c +++ b/drivers/scsi/isci/request.c @@ -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; -} diff --git a/drivers/scsi/isci/request.h b/drivers/scsi/isci/request.h index 642b21166fc6..9c97715e54d8 100644 --- a/drivers/scsi/isci/request.h +++ b/drivers/scsi/isci/request.h @@ -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, |