diff options
author | Lendacky, Thomas <Thomas.Lendacky@amd.com> | 2017-08-18 09:02:27 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-18 16:30:16 -0700 |
commit | f087b506ff5c38e0f2873651dba4e2b73a1b2d67 (patch) | |
tree | 6e6a735e5d2fd7dbb36a906348ca4071361d0b0f /drivers/net/ethernet/amd | |
parent | 3b1ded4e0b5118040d44b3b85391aa8865b0d05c (diff) | |
download | linux-f087b506ff5c38e0f2873651dba4e2b73a1b2d67.tar.bz2 |
amd-xgbe: Set the MII control width for the MAC interface
When running in SGMII mode at speeds below 1000Mbps, the auto-negotition
control register must set the MII control width for the MAC interface
to be 8-bits wide. By default the width is 4-bits.
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')
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-common.h | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-common.h b/drivers/net/ethernet/amd/xgbe/xgbe-common.h index 9795419aac2d..d07edf9eaa69 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-common.h +++ b/drivers/net/ethernet/amd/xgbe/xgbe-common.h @@ -1339,6 +1339,7 @@ #define XGBE_AN_CL37_PCS_MODE_BASEX 0x00 #define XGBE_AN_CL37_PCS_MODE_SGMII 0x04 #define XGBE_AN_CL37_TX_CONFIG_MASK 0x08 +#define XGBE_AN_CL37_MII_CTRL_8BIT 0x0100 /* Bit setting and getting macros * The get macro will extract the current bit field value from within diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c index 80684914dd8a..2222bbf8d0a4 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c @@ -982,6 +982,8 @@ static void xgbe_an37_init(struct xgbe_prv_data *pdata) break; } + reg |= XGBE_AN_CL37_MII_CTRL_8BIT; + XMDIO_WRITE(pdata, MDIO_MMD_VEND2, MDIO_VEND2_AN_CTRL, reg); netif_dbg(pdata, link, pdata->netdev, "CL37 AN (%s) initialized\n", |