Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _SCSI_SAS_INTERNAL_H
0003 #define _SCSI_SAS_INTERNAL_H
0004 
0005 #define SAS_HOST_ATTRS      0
0006 #define SAS_PHY_ATTRS       17
0007 #define SAS_PORT_ATTRS      1
0008 #define SAS_RPORT_ATTRS     8
0009 #define SAS_END_DEV_ATTRS   5
0010 #define SAS_EXPANDER_ATTRS  7
0011 
0012 struct sas_internal {
0013     struct scsi_transport_template t;
0014     struct sas_function_template *f;
0015     struct sas_domain_function_template *dft;
0016 
0017     struct device_attribute private_host_attrs[SAS_HOST_ATTRS];
0018     struct device_attribute private_phy_attrs[SAS_PHY_ATTRS];
0019     struct device_attribute private_port_attrs[SAS_PORT_ATTRS];
0020     struct device_attribute private_rphy_attrs[SAS_RPORT_ATTRS];
0021     struct device_attribute private_end_dev_attrs[SAS_END_DEV_ATTRS];
0022     struct device_attribute private_expander_attrs[SAS_EXPANDER_ATTRS];
0023 
0024     struct transport_container phy_attr_cont;
0025     struct transport_container port_attr_cont;
0026     struct transport_container rphy_attr_cont;
0027     struct transport_container end_dev_attr_cont;
0028     struct transport_container expander_attr_cont;
0029 
0030     /*
0031      * The array of null terminated pointers to attributes
0032      * needed by scsi_sysfs.c
0033      */
0034     struct device_attribute *host_attrs[SAS_HOST_ATTRS + 1];
0035     struct device_attribute *phy_attrs[SAS_PHY_ATTRS + 1];
0036     struct device_attribute *port_attrs[SAS_PORT_ATTRS + 1];
0037     struct device_attribute *rphy_attrs[SAS_RPORT_ATTRS + 1];
0038     struct device_attribute *end_dev_attrs[SAS_END_DEV_ATTRS + 1];
0039     struct device_attribute *expander_attrs[SAS_EXPANDER_ATTRS + 1];
0040 };
0041 #define to_sas_internal(tmpl)   container_of(tmpl, struct sas_internal, t)
0042 
0043 #endif