isci: Removing unnecessary functions in request.c
authorDave Jiang <dave.jiang@intel.com>
Fri, 6 May 2011 02:17:37 +0000 (02:17 +0000)
committerDan Williams <dan.j.williams@intel.com>
Sun, 3 Jul 2011 11:04:46 +0000 (04:04 -0700)
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>
drivers/scsi/isci/core/scic_sds_request.c
drivers/scsi/isci/request.c
drivers/scsi/isci/request.h

index 6286decd62e517395c9b61ec4dc51b890df9ca2e..52692a16449d4425c3bcd1b5fdbb51195073858b 100644 (file)
@@ -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,
index 0521c045d43bbcd95e13d65a609e9f1da0fa2f93..e01c2c98f4e9c28f609836b5ed63c1bd182044bf 100644 (file)
@@ -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;
-}
index 642b21166fc620d1138e7c9676a109163abf0e69..9c97715e54d8c904292e999b15fc31aad6137de5 100644 (file)
@@ -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,