diff options
Diffstat (limited to 'drivers/scsi/isci/request.c')
-rw-r--r-- | drivers/scsi/isci/request.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index ff5c05a19543..281a556f5eeb 100644 --- a/drivers/scsi/isci/request.c +++ b/drivers/scsi/isci/request.c | |||
@@ -175,7 +175,6 @@ static enum sci_status isci_io_request_build( | |||
175 | struct isci_request *request, | 175 | struct isci_request *request, |
176 | struct isci_remote_device *isci_device) | 176 | struct isci_remote_device *isci_device) |
177 | { | 177 | { |
178 | struct smp_discover_response_protocols dev_protocols; | ||
179 | enum sci_status status = SCI_SUCCESS; | 178 | enum sci_status status = SCI_SUCCESS; |
180 | struct sas_task *task = isci_request_access_task(request); | 179 | struct sas_task *task = isci_request_access_task(request); |
181 | struct scic_sds_remote_device *sci_device = &isci_device->sci; | 180 | struct scic_sds_remote_device *sci_device = &isci_device->sci; |
@@ -228,15 +227,19 @@ static enum sci_status isci_io_request_build( | |||
228 | 227 | ||
229 | sci_object_set_association(request->sci_request_handle, request); | 228 | sci_object_set_association(request->sci_request_handle, request); |
230 | 229 | ||
231 | /* Determine protocol and call the appropriate basic constructor */ | 230 | switch (task->task_proto) { |
232 | scic_remote_device_get_protocols(sci_device, &dev_protocols); | 231 | case SAS_PROTOCOL_SMP: |
233 | if (dev_protocols.u.bits.attached_ssp_target) | 232 | status = isci_smp_request_build(request); |
233 | break; | ||
234 | case SAS_PROTOCOL_SSP: | ||
234 | status = isci_request_ssp_request_construct(request); | 235 | status = isci_request_ssp_request_construct(request); |
235 | else if (dev_protocols.u.bits.attached_stp_target) | 236 | break; |
237 | case SAS_PROTOCOL_SATA: | ||
238 | case SAS_PROTOCOL_STP: | ||
239 | case SAS_PROTOCOL_SATA | SAS_PROTOCOL_STP: | ||
236 | status = isci_request_stp_request_construct(request); | 240 | status = isci_request_stp_request_construct(request); |
237 | else if (dev_protocols.u.bits.attached_smp_target) | 241 | break; |
238 | status = isci_smp_request_build(request); | 242 | default: |
239 | else { | ||
240 | dev_warn(&isci_host->pdev->dev, | 243 | dev_warn(&isci_host->pdev->dev, |
241 | "%s: unknown protocol\n", __func__); | 244 | "%s: unknown protocol\n", __func__); |
242 | return SCI_FAILURE; | 245 | return SCI_FAILURE; |