diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-02-18 12:25:13 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 06:55:27 -0400 |
commit | 83e514301ec73b16fb258618c9f9b443cca3744a (patch) | |
tree | 6310240e8336c7e5e2ae5c41f41a1de21d48ea90 | |
parent | 92f4f0f544a6a75979bace0c43fee9c4fb95830c (diff) |
isci: advertise linkrate
Inform libsas of the linkrate of direct attached links.
Reported-by: Haavard Skinnemoen <hskinnemoen@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r-- | drivers/scsi/isci/core/scic_phy.h | 3 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_phy.c | 5 | ||||
-rw-r--r-- | drivers/scsi/isci/port.c | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/isci/core/scic_phy.h b/drivers/scsi/isci/core/scic_phy.h index 13f8a304fdef..bf0d3be58eda 100644 --- a/drivers/scsi/isci/core/scic_phy.h +++ b/drivers/scsi/isci/core/scic_phy.h | |||
@@ -72,6 +72,9 @@ | |||
72 | struct scic_sds_phy; | 72 | struct scic_sds_phy; |
73 | struct scic_sds_port; | 73 | struct scic_sds_port; |
74 | 74 | ||
75 | |||
76 | enum sas_linkrate sci_phy_linkrate(struct scic_sds_phy *sci_phy); | ||
77 | |||
75 | /** | 78 | /** |
76 | * struct scic_phy_properties - This structure defines the properties common to | 79 | * struct scic_phy_properties - This structure defines the properties common to |
77 | * all phys that can be retrieved. | 80 | * all phys that can be retrieved. |
diff --git a/drivers/scsi/isci/core/scic_sds_phy.c b/drivers/scsi/isci/core/scic_sds_phy.c index d9213e215beb..743e5a6b7409 100644 --- a/drivers/scsi/isci/core/scic_sds_phy.c +++ b/drivers/scsi/isci/core/scic_sds_phy.c | |||
@@ -73,6 +73,11 @@ | |||
73 | /* Maximum arbitration wait time in micro-seconds */ | 73 | /* Maximum arbitration wait time in micro-seconds */ |
74 | #define SCIC_SDS_PHY_MAX_ARBITRATION_WAIT_TIME (700) | 74 | #define SCIC_SDS_PHY_MAX_ARBITRATION_WAIT_TIME (700) |
75 | 75 | ||
76 | enum sas_linkrate sci_phy_linkrate(struct scic_sds_phy *sci_phy) | ||
77 | { | ||
78 | return sci_phy->max_negotiated_speed; | ||
79 | } | ||
80 | |||
76 | /* | 81 | /* |
77 | * ***************************************************************************** | 82 | * ***************************************************************************** |
78 | * * SCIC SDS PHY Internal Methods | 83 | * * SCIC SDS PHY Internal Methods |
diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c index 2343f6556428..446da20521c9 100644 --- a/drivers/scsi/isci/port.c +++ b/drivers/scsi/isci/port.c | |||
@@ -263,6 +263,8 @@ void isci_port_link_up( | |||
263 | success = false; | 263 | success = false; |
264 | } | 264 | } |
265 | 265 | ||
266 | isci_phy->sas_phy.phy->negotiated_linkrate = sci_phy_linkrate(phy); | ||
267 | |||
266 | spin_unlock_irqrestore(&isci_phy->sas_phy.frame_rcvd_lock, flags); | 268 | spin_unlock_irqrestore(&isci_phy->sas_phy.frame_rcvd_lock, flags); |
267 | 269 | ||
268 | /* Notify libsas that we have an address frame, if indeed | 270 | /* Notify libsas that we have an address frame, if indeed |