Skip to content

Commit 65c92b0

Browse files
James BottomleyJames Bottomley
authored andcommitted
[SCSI] scsi_transport_sas: introduce a sas_port entity
this patch introduces a port object, separates out ports and phys, with ports becoming the primary objects of the tree. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
1 parent 2076eb6 commit 65c92b0

File tree

3 files changed

+372
-46
lines changed

3 files changed

+372
-46
lines changed

drivers/scsi/scsi_sas_internal.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
#define _SCSI_SAS_INTERNAL_H
33

44
#define SAS_HOST_ATTRS 0
5-
#define SAS_PORT_ATTRS 17
5+
#define SAS_PHY_ATTRS 17
6+
#define SAS_PORT_ATTRS 1
67
#define SAS_RPORT_ATTRS 7
78
#define SAS_END_DEV_ATTRS 3
89
#define SAS_EXPANDER_ATTRS 7
@@ -13,12 +14,14 @@ struct sas_internal {
1314
struct sas_domain_function_template *dft;
1415

1516
struct class_device_attribute private_host_attrs[SAS_HOST_ATTRS];
16-
struct class_device_attribute private_phy_attrs[SAS_PORT_ATTRS];
17+
struct class_device_attribute private_phy_attrs[SAS_PHY_ATTRS];
18+
struct class_device_attribute private_port_attrs[SAS_PORT_ATTRS];
1719
struct class_device_attribute private_rphy_attrs[SAS_RPORT_ATTRS];
1820
struct class_device_attribute private_end_dev_attrs[SAS_END_DEV_ATTRS];
1921
struct class_device_attribute private_expander_attrs[SAS_EXPANDER_ATTRS];
2022

2123
struct transport_container phy_attr_cont;
24+
struct transport_container port_attr_cont;
2225
struct transport_container rphy_attr_cont;
2326
struct transport_container end_dev_attr_cont;
2427
struct transport_container expander_attr_cont;
@@ -28,7 +31,8 @@ struct sas_internal {
2831
* needed by scsi_sysfs.c
2932
*/
3033
struct class_device_attribute *host_attrs[SAS_HOST_ATTRS + 1];
31-
struct class_device_attribute *phy_attrs[SAS_PORT_ATTRS + 1];
34+
struct class_device_attribute *phy_attrs[SAS_PHY_ATTRS + 1];
35+
struct class_device_attribute *port_attrs[SAS_PORT_ATTRS + 1];
3236
struct class_device_attribute *rphy_attrs[SAS_RPORT_ATTRS + 1];
3337
struct class_device_attribute *end_dev_attrs[SAS_END_DEV_ATTRS + 1];
3438
struct class_device_attribute *expander_attrs[SAS_EXPANDER_ATTRS + 1];

0 commit comments

Comments
 (0)