aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@us.ibm.com>2007-01-11 17:14:57 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-01-13 17:13:00 -0500
commitacbf167d4ad8c27f9743a4b539d51ae9535bf21c (patch)
treee53f8330f60acaef42d74a745b3dd5131b424e49 /include/scsi
parentb218a0d8e250e0ae8fd4d4e45bd66a588b380752 (diff)
[SCSI] libsas: Add a sysfs knob to enable/disable a phy
This patch lets a user arbitrarily enable or disable a phy via sysfs. Potential applications include shutting down a phy to replace one lane of wide port, and (more importantly) providing a method for the libata SATL to control the phy. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/libsas.h3
-rw-r--r--include/scsi/scsi_transport_sas.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index da96bcfb9e46..0689d6682aa3 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -614,6 +614,9 @@ struct sas_domain_function_template {
614extern int sas_register_ha(struct sas_ha_struct *); 614extern int sas_register_ha(struct sas_ha_struct *);
615extern int sas_unregister_ha(struct sas_ha_struct *); 615extern int sas_unregister_ha(struct sas_ha_struct *);
616 616
617int sas_set_phy_speed(struct sas_phy *phy,
618 struct sas_phy_linkrates *rates);
619int sas_phy_enable(struct sas_phy *phy, int enabled);
617int sas_phy_reset(struct sas_phy *phy, int hard_reset); 620int sas_phy_reset(struct sas_phy *phy, int hard_reset);
618extern int sas_queuecommand(struct scsi_cmnd *, 621extern int sas_queuecommand(struct scsi_cmnd *,
619 void (*scsi_done)(struct scsi_cmnd *)); 622 void (*scsi_done)(struct scsi_cmnd *));
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h
index 59633a82de47..45d58598c3ee 100644
--- a/include/scsi/scsi_transport_sas.h
+++ b/include/scsi/scsi_transport_sas.h
@@ -54,6 +54,7 @@ struct sas_identify {
54struct sas_phy { 54struct sas_phy {
55 struct device dev; 55 struct device dev;
56 int number; 56 int number;
57 int enabled;
57 58
58 /* phy identification */ 59 /* phy identification */
59 struct sas_identify identify; 60 struct sas_identify identify;
@@ -163,6 +164,7 @@ struct sas_function_template {
163 int (*get_enclosure_identifier)(struct sas_rphy *, u64 *); 164 int (*get_enclosure_identifier)(struct sas_rphy *, u64 *);
164 int (*get_bay_identifier)(struct sas_rphy *); 165 int (*get_bay_identifier)(struct sas_rphy *);
165 int (*phy_reset)(struct sas_phy *, int); 166 int (*phy_reset)(struct sas_phy *, int);
167 int (*phy_enable)(struct sas_phy *, int);
166 int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *); 168 int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *);
167}; 169};
168 170