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>
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c
index e011d66..c6f1ffd 100644
--- a/drivers/scsi/isci/task.c
+++ b/drivers/scsi/isci/task.c
@@ -273,15 +273,14 @@
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 @@
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 @@
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);