summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-02-18 20:25:13 +0300
committerDan Williams <dan.j.williams@intel.com>2011-07-03 14:55:27 +0400
commit83e514301ec73b16fb258618c9f9b443cca3744a (patch)
tree6310240e8336c7e5e2ae5c41f41a1de21d48ea90 /drivers
parent92f4f0f544a6a75979bace0c43fee9c4fb95830c (diff)
downloadlinux-83e514301ec73b16fb258618c9f9b443cca3744a.tar.xz
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/isci/core/scic_phy.h3
-rw-r--r--drivers/scsi/isci/core/scic_sds_phy.c5
-rw-r--r--drivers/scsi/isci/port.c2
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 @@
struct scic_sds_phy;
struct scic_sds_port;
+
+enum sas_linkrate sci_phy_linkrate(struct scic_sds_phy *sci_phy);
+
/**
* struct scic_phy_properties - This structure defines the properties common to
* 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 @@
/* Maximum arbitration wait time in micro-seconds */
#define SCIC_SDS_PHY_MAX_ARBITRATION_WAIT_TIME (700)
+enum sas_linkrate sci_phy_linkrate(struct scic_sds_phy *sci_phy)
+{
+ return sci_phy->max_negotiated_speed;
+}
+
/*
* *****************************************************************************
* * 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(
success = false;
}
+ isci_phy->sas_phy.phy->negotiated_linkrate = sci_phy_linkrate(phy);
+
spin_unlock_irqrestore(&isci_phy->sas_phy.frame_rcvd_lock, flags);
/* Notify libsas that we have an address frame, if indeed