diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-04-21 21:44:45 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 07:00:38 -0400 |
commit | a1a113b0a1ea437daf099b44f8a39e93a02a3f47 (patch) | |
tree | c9576cfc8c12447d0932accee0e3b59d175c08d9 /drivers/scsi/isci/remote_device.h | |
parent | b87ee3075b090e1dd0bdf40b295142b606d55e64 (diff) |
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/remote_device.h')
-rw-r--r-- | drivers/scsi/isci/remote_device.h | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/drivers/scsi/isci/remote_device.h b/drivers/scsi/isci/remote_device.h index 9d8fcbf72ded..39821601022b 100644 --- a/drivers/scsi/isci/remote_device.h +++ b/drivers/scsi/isci/remote_device.h | |||
@@ -100,11 +100,6 @@ struct scic_sds_remote_device { | |||
100 | enum sas_linkrate connection_rate; | 100 | enum sas_linkrate connection_rate; |
101 | 101 | ||
102 | /** | 102 | /** |
103 | * This field contains the allowed target protocols for this remote device. | ||
104 | */ | ||
105 | struct smp_discover_response_protocols target_protocols; | ||
106 | |||
107 | /** | ||
108 | * This field contains the device SAS address. | 103 | * This field contains the device SAS address. |
109 | */ | 104 | */ |
110 | struct sci_sas_address device_address; | 105 | struct sci_sas_address device_address; |
@@ -264,23 +259,6 @@ enum sci_status scic_remote_device_reset_complete( | |||
264 | enum sas_linkrate scic_remote_device_get_connection_rate( | 259 | enum sas_linkrate scic_remote_device_get_connection_rate( |
265 | struct scic_sds_remote_device *remote_device); | 260 | struct scic_sds_remote_device *remote_device); |
266 | 261 | ||
267 | /** | ||
268 | * scic_remote_device_get_protocols() - This method will indicate which | ||
269 | * protocols are supported by this remote device. | ||
270 | * @remote_device: This parameter specifies the device for which to return the | ||
271 | * protocol. | ||
272 | * @protocols: This parameter specifies the output values, from the remote | ||
273 | * device object, which indicate the protocols supported by the supplied | ||
274 | * remote_device. | ||
275 | * | ||
276 | * The type of protocols supported by this device. The values are returned as | ||
277 | * part of a bit mask in order to allow for multi-protocol support. | ||
278 | */ | ||
279 | void scic_remote_device_get_protocols( | ||
280 | struct scic_sds_remote_device *remote_device, | ||
281 | struct smp_discover_response_protocols *protocols); | ||
282 | |||
283 | |||
284 | #if !defined(DISABLE_ATAPI) | 262 | #if !defined(DISABLE_ATAPI) |
285 | /** | 263 | /** |
286 | * scic_remote_device_is_atapi() - | 264 | * scic_remote_device_is_atapi() - |
@@ -477,6 +455,18 @@ static inline struct scic_sds_remote_device *rnc_to_dev(struct scic_sds_remote_n | |||
477 | return sci_dev; | 455 | return sci_dev; |
478 | } | 456 | } |
479 | 457 | ||
458 | static inline struct domain_device *sci_dev_to_domain(struct scic_sds_remote_device *sci_dev) | ||
459 | { | ||
460 | struct isci_remote_device *idev = container_of(sci_dev, typeof(*idev), sci); | ||
461 | |||
462 | return idev->domain_dev; | ||
463 | } | ||
464 | |||
465 | static inline bool dev_is_expander(struct domain_device *dev) | ||
466 | { | ||
467 | return dev->dev_type == EDGE_DEV || dev->dev_type == FANOUT_DEV; | ||
468 | } | ||
469 | |||
480 | typedef enum sci_status (*scic_sds_remote_device_request_handler_t)( | 470 | typedef enum sci_status (*scic_sds_remote_device_request_handler_t)( |
481 | struct scic_sds_remote_device *device, | 471 | struct scic_sds_remote_device *device, |
482 | struct scic_sds_request *request); | 472 | struct scic_sds_request *request); |