summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/remote_device.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-04-21 18:44:45 -0700
committerDan Williams <dan.j.williams@intel.com>2011-07-03 04:00:38 -0700
commita1a113b0a1ea437daf099b44f8a39e93a02a3f47 (patch)
treec9576cfc8c12447d0932accee0e3b59d175c08d9 /drivers/scsi/isci/remote_device.h
parentb87ee3075b090e1dd0bdf40b295142b606d55e64 (diff)
downloadblackbird-op-linux-a1a113b0a1ea437daf099b44f8a39e93a02a3f47.tar.gz
blackbird-op-linux-a1a113b0a1ea437daf099b44f8a39e93a02a3f47.zip
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.h34
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 {
enum sas_linkrate connection_rate;
/**
- * This field contains the allowed target protocols for this remote device.
- */
- struct smp_discover_response_protocols target_protocols;
-
- /**
* This field contains the device SAS address.
*/
struct sci_sas_address device_address;
@@ -264,23 +259,6 @@ enum sci_status scic_remote_device_reset_complete(
enum sas_linkrate scic_remote_device_get_connection_rate(
struct scic_sds_remote_device *remote_device);
-/**
- * scic_remote_device_get_protocols() - This method will indicate which
- * protocols are supported by this remote device.
- * @remote_device: This parameter specifies the device for which to return the
- * protocol.
- * @protocols: This parameter specifies the output values, from the remote
- * device object, which indicate the protocols supported by the supplied
- * remote_device.
- *
- * The type of protocols supported by this device. The values are returned as
- * part of a bit mask in order to allow for multi-protocol support.
- */
-void scic_remote_device_get_protocols(
- struct scic_sds_remote_device *remote_device,
- struct smp_discover_response_protocols *protocols);
-
-
#if !defined(DISABLE_ATAPI)
/**
* scic_remote_device_is_atapi() -
@@ -477,6 +455,18 @@ static inline struct scic_sds_remote_device *rnc_to_dev(struct scic_sds_remote_n
return sci_dev;
}
+static inline struct domain_device *sci_dev_to_domain(struct scic_sds_remote_device *sci_dev)
+{
+ struct isci_remote_device *idev = container_of(sci_dev, typeof(*idev), sci);
+
+ return idev->domain_dev;
+}
+
+static inline bool dev_is_expander(struct domain_device *dev)
+{
+ return dev->dev_type == EDGE_DEV || dev->dev_type == FANOUT_DEV;
+}
+
typedef enum sci_status (*scic_sds_remote_device_request_handler_t)(
struct scic_sds_remote_device *device,
struct scic_sds_request *request);
OpenPOWER on IntegriCloud