diff options
author | Lendacky, Thomas <Thomas.Lendacky@amd.com> | 2016-11-03 21:18:47 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-04 21:48:44 +0300 |
commit | 1bf40ada62901e14395902d0934a4e51e04afe46 (patch) | |
tree | af1a1ee61b1fc5579a58f53ae9e16ea3e1629cfe /drivers/net/ethernet/amd/xgbe/xgbe.h | |
parent | a64def4161d4b8fffea43807f582ffc3e4e5d128 (diff) | |
download | linux-1bf40ada62901e14395902d0934a4e51e04afe46.tar.xz |
amd-xgbe: Add support for clause 37 auto-negotiation
Add support to be able to use clause 37 auto-negotiation.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/xgbe/xgbe.h')
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h index d90ecbcb97a6..8cb4f20ddab4 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe.h +++ b/drivers/net/ethernet/amd/xgbe/xgbe.h @@ -261,7 +261,13 @@ /* Auto-negotiation */ #define XGBE_AN_MS_TIMEOUT 500 -#define XGBE_LINK_TIMEOUT 10 +#define XGBE_LINK_TIMEOUT 5 + +#define XGBE_SGMII_AN_LINK_STATUS BIT(1) +#define XGBE_SGMII_AN_LINK_SPEED (BIT(2) | BIT(3)) +#define XGBE_SGMII_AN_LINK_SPEED_100 0x04 +#define XGBE_SGMII_AN_LINK_SPEED_1000 0x08 +#define XGBE_SGMII_AN_LINK_DUPLEX BIT(4) struct xgbe_prv_data; @@ -467,6 +473,8 @@ enum xgbe_speed { enum xgbe_an_mode { XGBE_AN_MODE_CL73 = 0, + XGBE_AN_MODE_CL37, + XGBE_AN_MODE_CL37_SGMII, XGBE_AN_MODE_NONE, }; @@ -961,6 +969,7 @@ struct xgbe_prv_data { /* Auto-negotiation state machine support */ unsigned int an_int; + unsigned int an_status; struct mutex an_mutex; enum xgbe_an an_result; enum xgbe_an an_state; |