summaryrefslogtreecommitdiff
path: root/drivers/scsi/isci/task.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-04-22 05:44:45 +0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 15:00:38 +0400
commita1a113b0a1ea437daf099b44f8a39e93a02a3f47 (patch)
treec9576cfc8c12447d0932accee0e3b59d175c08d9 /drivers/scsi/isci/task.c
parentb87ee3075b090e1dd0bdf40b295142b606d55e64 (diff)
downloadlinux-a1a113b0a1ea437daf099b44f8a39e93a02a3f47.tar.xz
isci: kill smp_discover_response_protocols in favor of domain_device.dev_type
This is step 1 of removing the contortions to: 1/ unparse expander phy data into a smp discover frame 2/ open-code-parse the smp discover fram into a domain_device.dev_type equivalent libsas has already spent cycles determining the dev_type, so now that scic_sds_remote_device is unified with isci_remote_device we can directly reference dev_type. This might also change multi-level expander detection as we previously only looked at dev_type == EDGE_DEV and we did not consider the FANOUT_DEV case. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/task.c')
-rw-r--r--drivers/scsi/isci/task.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c
index e011d668949d..c6f1ffd713a8 100644
--- a/drivers/scsi/isci/task.c
+++ b/drivers/scsi/isci/task.c
@@ -273,15 +273,14 @@ static enum sci_status isci_task_request_build(
enum sci_status status = SCI_FAILURE;
struct isci_request *request = NULL;
struct isci_remote_device *isci_device;
-/* struct sci_sas_identify_address_frame_protocols dev_protocols; */
- struct smp_discover_response_protocols dev_protocols;
-
+ struct domain_device *dev;
dev_dbg(&isci_host->pdev->dev,
"%s: isci_tmf = %p\n", __func__, isci_tmf);
isci_device = isci_tmf->device;
sci_device = &isci_device->sci;
+ dev = isci_device->domain_dev;
/* do common allocation and init of request object. */
status = isci_request_alloc_tmf(
@@ -319,16 +318,8 @@ static enum sci_status isci_task_request_build(
request
);
- scic_remote_device_get_protocols(
- sci_device,
- &dev_protocols
- );
-
- /* let the core do it's protocol
- * specific construction.
- */
- if (dev_protocols.u.bits.attached_ssp_target) {
-
+ /* XXX convert to get this from task->tproto like other drivers */
+ if (dev->dev_type == SAS_END_DEV) {
isci_tmf->proto = SAS_PROTOCOL_SSP;
status = scic_task_request_construct_ssp(
request->sci_request_handle
@@ -337,8 +328,7 @@ static enum sci_status isci_task_request_build(
goto errout;
}
- if (dev_protocols.u.bits.attached_stp_target) {
-
+ if (dev->dev_type == SATA_DEV || (dev->tproto & SAS_PROTOCOL_STP)) {
isci_tmf->proto = SAS_PROTOCOL_SATA;
status = isci_sata_management_task_request_build(request);