diff options
| author | Christoph Hellwig <hch@lst.de> | 2005-09-19 15:59:42 -0400 |
|---|---|---|
| committer | James Bottomley <jejb@mulgrave.(none)> | 2005-10-28 15:57:58 -0400 |
| commit | c3ee74c4e91017169c7f1fa74a57ba8502ec49c3 (patch) | |
| tree | 44e429eab97f84511ecd1fb7f2e7568c4e5beecc /include | |
| parent | d25cf1ced9d446dcd3fd399e15b518fea936f3ed (diff) | |
[SCSI] scsi_transport_sas: support link error attributes
For now supporting the ->get_linkerrors method is mandatory. I'll
probably be beaten to implement the .show_foo variables and different
types of attributes soon..
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/scsi/scsi_transport_sas.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index bc4aeb660dd3..38389d8dd56e 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h | |||
| @@ -41,20 +41,28 @@ 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 */ | ||
| 45 | struct sas_function_template { | ||
| 46 | }; | ||
| 47 | |||
| 48 | struct sas_phy { | 44 | struct 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 | /* link error statistics */ | ||
| 60 | u32 invalid_dword_count; | ||
| 61 | u32 running_disparity_error_count; | ||
| 62 | u32 loss_of_dword_sync_count; | ||
| 63 | u32 phy_reset_problem_count; | ||
| 64 | |||
| 65 | /* the other end of the link */ | ||
| 58 | struct sas_rphy *rphy; | 66 | struct sas_rphy *rphy; |
| 59 | }; | 67 | }; |
| 60 | 68 | ||
| @@ -79,6 +87,13 @@ struct sas_rphy { | |||
| 79 | #define rphy_to_shost(rphy) \ | 87 | #define rphy_to_shost(rphy) \ |
| 80 | dev_to_shost((rphy)->dev.parent) | 88 | dev_to_shost((rphy)->dev.parent) |
| 81 | 89 | ||
| 90 | |||
| 91 | /* The functions by which the transport class and the driver communicate */ | ||
| 92 | struct sas_function_template { | ||
| 93 | int (*get_linkerrors)(struct sas_phy *); | ||
| 94 | }; | ||
| 95 | |||
| 96 | |||
| 82 | extern void sas_remove_host(struct Scsi_Host *); | 97 | extern void sas_remove_host(struct Scsi_Host *); |
| 83 | 98 | ||
| 84 | extern struct sas_phy *sas_phy_alloc(struct device *, int); | 99 | extern struct sas_phy *sas_phy_alloc(struct device *, int); |
