diff options
author | Lendacky, Thomas <Thomas.Lendacky@amd.com> | 2014-07-29 09:57:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-30 21:46:53 -0400 |
commit | b668a3aefd48ea4cc3fdcb730989e362f13ed431 (patch) | |
tree | f28c799e1831ebfcdf0ea1dbeadffb044dd33091 /drivers/net/phy | |
parent | 5c10e5cb0fbdde6cc79ca406b8bdcb05aa0c9489 (diff) |
amd-xgbe-phy: Print out the auto-negotiation method used
Add a netdev_info statement detailing whether auto-negotiation was
completed through parallel detection or through the auto-negotiation
protocol.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/amd-xgbe-phy.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/phy/amd-xgbe-phy.c b/drivers/net/phy/amd-xgbe-phy.c index 39428e5a1700..388e3029165a 100644 --- a/drivers/net/phy/amd-xgbe-phy.c +++ b/drivers/net/phy/amd-xgbe-phy.c | |||
@@ -857,6 +857,7 @@ static void amd_xgbe_an_state_machine(struct work_struct *work) | |||
857 | struct phy_device *phydev = priv->phydev; | 857 | struct phy_device *phydev = priv->phydev; |
858 | enum amd_xgbe_phy_an cur_state; | 858 | enum amd_xgbe_phy_an cur_state; |
859 | int sleep; | 859 | int sleep; |
860 | unsigned int an_supported = 0; | ||
860 | 861 | ||
861 | while (1) { | 862 | while (1) { |
862 | mutex_lock(&priv->an_mutex); | 863 | mutex_lock(&priv->an_mutex); |
@@ -866,6 +867,7 @@ static void amd_xgbe_an_state_machine(struct work_struct *work) | |||
866 | switch (priv->an_state) { | 867 | switch (priv->an_state) { |
867 | case AMD_XGBE_AN_START: | 868 | case AMD_XGBE_AN_START: |
868 | priv->an_state = amd_xgbe_an_start(phydev); | 869 | priv->an_state = amd_xgbe_an_start(phydev); |
870 | an_supported = 0; | ||
869 | break; | 871 | break; |
870 | 872 | ||
871 | case AMD_XGBE_AN_EVENT: | 873 | case AMD_XGBE_AN_EVENT: |
@@ -874,6 +876,7 @@ static void amd_xgbe_an_state_machine(struct work_struct *work) | |||
874 | 876 | ||
875 | case AMD_XGBE_AN_PAGE_RECEIVED: | 877 | case AMD_XGBE_AN_PAGE_RECEIVED: |
876 | priv->an_state = amd_xgbe_an_page_received(phydev); | 878 | priv->an_state = amd_xgbe_an_page_received(phydev); |
879 | an_supported++; | ||
877 | break; | 880 | break; |
878 | 881 | ||
879 | case AMD_XGBE_AN_INCOMPAT_LINK: | 882 | case AMD_XGBE_AN_INCOMPAT_LINK: |
@@ -881,6 +884,11 @@ static void amd_xgbe_an_state_machine(struct work_struct *work) | |||
881 | break; | 884 | break; |
882 | 885 | ||
883 | case AMD_XGBE_AN_COMPLETE: | 886 | case AMD_XGBE_AN_COMPLETE: |
887 | netdev_info(phydev->attached_dev, "%s successful\n", | ||
888 | an_supported ? "Auto negotiation" | ||
889 | : "Parallel detection"); | ||
890 | /* fall through */ | ||
891 | |||
884 | case AMD_XGBE_AN_NO_LINK: | 892 | case AMD_XGBE_AN_NO_LINK: |
885 | case AMD_XGBE_AN_EXIT: | 893 | case AMD_XGBE_AN_EXIT: |
886 | goto exit_unlock; | 894 | goto exit_unlock; |