diff options
-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) | |||
666 | enum sci_status scic_io_request_construct_basic_ssp( | 666 | enum sci_status scic_io_request_construct_basic_ssp( |
667 | struct scic_sds_request *sci_req) | 667 | struct scic_sds_request *sci_req) |
668 | { | 668 | { |
669 | struct isci_request *isci_request = sci_req->ireq; | 669 | struct isci_request *ireq = sci_req->ireq; |
670 | struct sas_task *task = isci_request_access_task(ireq); | ||
670 | 671 | ||
671 | sci_req->protocol = SCIC_SSP_PROTOCOL; | 672 | sci_req->protocol = SCIC_SSP_PROTOCOL; |
672 | 673 | ||
673 | scu_ssp_io_request_construct_task_context( | 674 | scu_ssp_io_request_construct_task_context(sci_req, |
674 | sci_req, | 675 | task->data_dir, |
675 | isci_request_io_request_get_data_direction(isci_request), | 676 | task->total_xfer_len); |
676 | isci_request_io_request_get_transfer_length(isci_request)); | ||
677 | 677 | ||
678 | scic_sds_io_request_build_ssp_command_iu(sci_req); | 678 | scic_sds_io_request_build_ssp_command_iu(sci_req); |
679 | 679 | ||
680 | sci_base_state_machine_change_state(&sci_req->state_machine, | 680 | sci_base_state_machine_change_state( |
681 | SCI_BASE_REQUEST_STATE_CONSTRUCTED); | 681 | &sci_req->state_machine, |
682 | SCI_BASE_REQUEST_STATE_CONSTRUCTED); | ||
682 | 683 | ||
683 | return SCI_SUCCESS; | 684 | return SCI_SUCCESS; |
684 | } | 685 | } |
@@ -705,8 +706,6 @@ enum sci_status scic_io_request_construct_basic_sata( | |||
705 | { | 706 | { |
706 | enum sci_status status; | 707 | enum sci_status status; |
707 | struct scic_sds_stp_request *stp_req; | 708 | struct scic_sds_stp_request *stp_req; |
708 | u32 len; | ||
709 | enum dma_data_direction dir; | ||
710 | bool copy = false; | 709 | bool copy = false; |
711 | struct isci_request *isci_request = sci_req->ireq; | 710 | struct isci_request *isci_request = sci_req->ireq; |
712 | struct sas_task *task = isci_request_access_task(isci_request); | 711 | struct sas_task *task = isci_request_access_task(isci_request); |
@@ -715,11 +714,12 @@ enum sci_status scic_io_request_construct_basic_sata( | |||
715 | 714 | ||
716 | sci_req->protocol = SCIC_STP_PROTOCOL; | 715 | sci_req->protocol = SCIC_STP_PROTOCOL; |
717 | 716 | ||
718 | len = isci_request_io_request_get_transfer_length(isci_request); | ||
719 | dir = isci_request_io_request_get_data_direction(isci_request); | ||
720 | copy = (task->data_dir == DMA_NONE) ? false : true; | 717 | copy = (task->data_dir == DMA_NONE) ? false : true; |
721 | 718 | ||
722 | status = scic_io_request_construct_sata(sci_req, len, dir, copy); | 719 | status = scic_io_request_construct_sata(sci_req, |
720 | task->total_xfer_len, | ||
721 | task->data_dir, | ||
722 | copy); | ||
723 | 723 | ||
724 | if (status == SCI_SUCCESS) | 724 | if (status == SCI_SUCCESS) |
725 | sci_base_state_machine_change_state(&sci_req->state_machine, | 725 | 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( | |||
1197 | 1197 | ||
1198 | isci_host_can_dequeue(isci_host, 1); | 1198 | isci_host_can_dequeue(isci_host, 1); |
1199 | } | 1199 | } |
1200 | |||
1201 | /** | ||
1202 | * isci_request_io_request_get_transfer_length() - This function is called by | ||
1203 | * the sci core to retrieve the transfer length for a given request. | ||
1204 | * @request: This parameter is the isci_request object. | ||
1205 | * | ||
1206 | * length of transfer for specified request. | ||
1207 | */ | ||
1208 | u32 isci_request_io_request_get_transfer_length(struct isci_request *request) | ||
1209 | { | ||
1210 | struct sas_task *task = isci_request_access_task(request); | ||
1211 | |||
1212 | dev_dbg(&request->isci_host->pdev->dev, | ||
1213 | "%s: total_xfer_len: %d\n", | ||
1214 | __func__, | ||
1215 | task->total_xfer_len); | ||
1216 | return task->total_xfer_len; | ||
1217 | } | ||
1218 | |||
1219 | |||
1220 | /** | ||
1221 | * isci_request_io_request_get_data_direction() - This function is called by | ||
1222 | * the sci core to retrieve the data direction for a given request. | ||
1223 | * @request: This parameter is the isci_request object. | ||
1224 | * | ||
1225 | * data direction for specified request. | ||
1226 | */ | ||
1227 | enum dma_data_direction isci_request_io_request_get_data_direction( | ||
1228 | struct isci_request *request) | ||
1229 | { | ||
1230 | struct sas_task *task = isci_request_access_task(request); | ||
1231 | |||
1232 | return task->data_dir; | ||
1233 | } | ||
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( | |||
343 | struct isci_request *request, | 343 | struct isci_request *request, |
344 | enum sci_io_status completion_status); | 344 | enum sci_io_status completion_status); |
345 | 345 | ||
346 | u32 isci_request_io_request_get_transfer_length( | ||
347 | struct isci_request *request); | ||
348 | |||
349 | enum dma_data_direction isci_request_io_request_get_data_direction(struct isci_request *req); | ||
350 | |||
351 | /** | 346 | /** |
352 | * isci_request_io_request_get_next_sge() - This function is called by the sci | 347 | * isci_request_io_request_get_next_sge() - This function is called by the sci |
353 | * core to retrieve the next sge for a given request. | 348 | * 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 | } | 386 | } |
392 | 387 | ||
393 | 388 | ||
394 | |||
395 | void *isci_request_ssp_io_request_get_cdb_address( | ||
396 | struct isci_request *request); | ||
397 | |||
398 | u32 isci_request_ssp_io_request_get_cdb_length( | ||
399 | struct isci_request *request); | ||
400 | |||
401 | u32 isci_request_ssp_io_request_get_lun( | ||
402 | struct isci_request *request); | ||
403 | |||
404 | u32 isci_request_ssp_io_request_get_task_attribute( | ||
405 | struct isci_request *request); | ||
406 | |||
407 | u32 isci_request_ssp_io_request_get_command_priority( | ||
408 | struct isci_request *request); | ||
409 | |||
410 | |||
411 | |||
412 | |||
413 | |||
414 | void isci_terminate_pending_requests( | 389 | void isci_terminate_pending_requests( |
415 | struct isci_host *isci_host, | 390 | struct isci_host *isci_host, |
416 | struct isci_remote_device *isci_device, | 391 | struct isci_remote_device *isci_device, |