diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-05-08 05:35:32 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 07:04:47 -0400 |
commit | b7645818cff1536038c0b21407eefb6b9d5755e6 (patch) | |
tree | 5b44923a329f8c00ca076ee38e1713c68a0315ab /drivers/scsi/isci/request.c | |
parent | 26298264a5de6d46d6e872dfd4c5d14c3011666f (diff) |
isci: make command/response iu explicit request object members
Final elimination of the anonymous data at the end of the request
structure.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/request.c')
-rw-r--r-- | drivers/scsi/isci/request.c | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index 9dd971a3fbb2..a5b9b22d3b3a 100644 --- a/drivers/scsi/isci/request.c +++ b/drivers/scsi/isci/request.c | |||
@@ -126,7 +126,6 @@ static enum sci_status isci_smp_request_build(struct isci_request *ireq) | |||
126 | enum sci_status status = SCI_FAILURE; | 126 | enum sci_status status = SCI_FAILURE; |
127 | struct sas_task *task = isci_request_access_task(ireq); | 127 | struct sas_task *task = isci_request_access_task(ireq); |
128 | struct scic_sds_request *sci_req = ireq->sci_request_handle; | 128 | struct scic_sds_request *sci_req = ireq->sci_request_handle; |
129 | void *cmd_iu = sci_req->command_buffer; | ||
130 | 129 | ||
131 | dev_dbg(&ireq->isci_host->pdev->dev, | 130 | dev_dbg(&ireq->isci_host->pdev->dev, |
132 | "%s: request = %p\n", __func__, ireq); | 131 | "%s: request = %p\n", __func__, ireq); |
@@ -138,7 +137,7 @@ static enum sci_status isci_smp_request_build(struct isci_request *ireq) | |||
138 | 137 | ||
139 | /* copy the smp_command to the address; */ | 138 | /* copy the smp_command to the address; */ |
140 | sg_copy_to_buffer(&task->smp_task.smp_req, 1, | 139 | sg_copy_to_buffer(&task->smp_task.smp_req, 1, |
141 | (char *)cmd_iu, | 140 | &sci_req->smp.cmd, |
142 | sizeof(struct smp_req)); | 141 | sizeof(struct smp_req)); |
143 | 142 | ||
144 | status = scic_io_request_construct_smp(sci_req); | 143 | status = scic_io_request_construct_smp(sci_req); |
@@ -998,25 +997,15 @@ void isci_request_io_request_complete( | |||
998 | task); | 997 | task); |
999 | 998 | ||
1000 | if (sas_protocol_ata(task->task_proto)) { | 999 | if (sas_protocol_ata(task->task_proto)) { |
1001 | resp_buf | 1000 | resp_buf = &request->sci_request_handle->stp.rsp; |
1002 | = scic_stp_io_request_get_d2h_reg_address( | ||
1003 | request->sci_request_handle | ||
1004 | ); | ||
1005 | isci_request_process_stp_response(task, | 1001 | isci_request_process_stp_response(task, |
1006 | resp_buf | 1002 | resp_buf); |
1007 | ); | ||
1008 | |||
1009 | } else if (SAS_PROTOCOL_SSP == task->task_proto) { | 1003 | } else if (SAS_PROTOCOL_SSP == task->task_proto) { |
1010 | 1004 | ||
1011 | /* crack the iu response buffer. */ | 1005 | /* crack the iu response buffer. */ |
1012 | resp_iu | 1006 | resp_iu = &request->sci_request_handle->ssp.rsp; |
1013 | = scic_io_request_get_response_iu_address( | ||
1014 | request->sci_request_handle | ||
1015 | ); | ||
1016 | |||
1017 | isci_request_process_response_iu(task, resp_iu, | 1007 | isci_request_process_response_iu(task, resp_iu, |
1018 | &isci_host->pdev->dev | 1008 | &isci_host->pdev->dev); |
1019 | ); | ||
1020 | 1009 | ||
1021 | } else if (SAS_PROTOCOL_SMP == task->task_proto) { | 1010 | } else if (SAS_PROTOCOL_SMP == task->task_proto) { |
1022 | 1011 | ||
@@ -1045,11 +1034,7 @@ void isci_request_io_request_complete( | |||
1045 | request->complete_in_target = true; | 1034 | request->complete_in_target = true; |
1046 | 1035 | ||
1047 | if (task->task_proto == SAS_PROTOCOL_SMP) { | 1036 | if (task->task_proto == SAS_PROTOCOL_SMP) { |
1048 | 1037 | void *rsp = &request->sci_request_handle->smp.rsp; | |
1049 | u8 *command_iu_address | ||
1050 | = scic_io_request_get_command_iu_address( | ||
1051 | request->sci_request_handle | ||
1052 | ); | ||
1053 | 1038 | ||
1054 | dev_dbg(&isci_host->pdev->dev, | 1039 | dev_dbg(&isci_host->pdev->dev, |
1055 | "%s: SMP protocol completion\n", | 1040 | "%s: SMP protocol completion\n", |
@@ -1057,9 +1042,7 @@ void isci_request_io_request_complete( | |||
1057 | 1042 | ||
1058 | sg_copy_from_buffer( | 1043 | sg_copy_from_buffer( |
1059 | &task->smp_task.smp_resp, 1, | 1044 | &task->smp_task.smp_resp, 1, |
1060 | command_iu_address | 1045 | rsp, sizeof(struct smp_resp)); |
1061 | + sizeof(struct smp_req), | ||
1062 | sizeof(struct smp_resp)); | ||
1063 | } else if (completion_status | 1046 | } else if (completion_status |
1064 | == SCI_IO_SUCCESS_IO_DONE_EARLY) { | 1047 | == SCI_IO_SUCCESS_IO_DONE_EARLY) { |
1065 | 1048 | ||