aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_transport_sas.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi/scsi_transport_sas.h')
-rw-r--r--include/scsi/scsi_transport_sas.h27
1 files changed, 23 insertions, 4 deletions
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h
index bc4aeb660dd3..b91400bfb02a 100644
--- a/include/scsi/scsi_transport_sas.h
+++ b/include/scsi/scsi_transport_sas.h
@@ -41,20 +41,31 @@ struct sas_identify {
41 u8 phy_identifier; 41 u8 phy_identifier;
42}; 42};
43 43
44/* The functions by which the transport class and the driver communicate */
45struct sas_function_template {
46};
47
48struct sas_phy { 44struct sas_phy {
49 struct device dev; 45 struct device dev;
50 int number; 46 int number;
47
48 /* phy identification */
51 struct sas_identify identify; 49 struct sas_identify identify;
50
51 /* phy attributes */
52 enum sas_linkrate negotiated_linkrate; 52 enum sas_linkrate negotiated_linkrate;
53 enum sas_linkrate minimum_linkrate_hw; 53 enum sas_linkrate minimum_linkrate_hw;
54 enum sas_linkrate minimum_linkrate; 54 enum sas_linkrate minimum_linkrate;
55 enum sas_linkrate maximum_linkrate_hw; 55 enum sas_linkrate maximum_linkrate_hw;
56 enum sas_linkrate maximum_linkrate; 56 enum sas_linkrate maximum_linkrate;
57 u8 port_identifier; 57 u8 port_identifier;
58
59 /* internal state */
60 unsigned int local_attached : 1;
61
62 /* link error statistics */
63 u32 invalid_dword_count;
64 u32 running_disparity_error_count;
65 u32 loss_of_dword_sync_count;
66 u32 phy_reset_problem_count;
67
68 /* the other end of the link */
58 struct sas_rphy *rphy; 69 struct sas_rphy *rphy;
59}; 70};
60 71
@@ -79,6 +90,14 @@ struct sas_rphy {
79#define rphy_to_shost(rphy) \ 90#define rphy_to_shost(rphy) \
80 dev_to_shost((rphy)->dev.parent) 91 dev_to_shost((rphy)->dev.parent)
81 92
93
94/* The functions by which the transport class and the driver communicate */
95struct sas_function_template {
96 int (*get_linkerrors)(struct sas_phy *);
97 int (*phy_reset)(struct sas_phy *, int);
98};
99
100
82extern void sas_remove_host(struct Scsi_Host *); 101extern void sas_remove_host(struct Scsi_Host *);
83 102
84extern struct sas_phy *sas_phy_alloc(struct device *, int); 103extern struct sas_phy *sas_phy_alloc(struct device *, int);