Commit 0d40b610 authored by Lendacky, Thomas's avatar Lendacky, Thomas Committed by David S. Miller

amd-xgbe-phy: Use the proper auto-negotiation XNP registers

When receiving and processing extended next pages the base registers
were used instead of the XNP registers. Update the code to use the
device XNP and link partner XNP registers.
Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cf262527
...@@ -122,6 +122,10 @@ MODULE_DESCRIPTION("AMD 10GbE (amd-xgbe) PHY driver"); ...@@ -122,6 +122,10 @@ MODULE_DESCRIPTION("AMD 10GbE (amd-xgbe) PHY driver");
#define MDIO_AN_XNP 0x0016 #define MDIO_AN_XNP 0x0016
#endif #endif
#ifndef MDIO_AN_LPX
#define MDIO_AN_LPX 0x0019
#endif
#ifndef MDIO_AN_INTMASK #ifndef MDIO_AN_INTMASK
#define MDIO_AN_INTMASK 0x8001 #define MDIO_AN_INTMASK 0x8001
#endif #endif
...@@ -779,11 +783,11 @@ static enum amd_xgbe_phy_an amd_xgbe_an_rx_xnp(struct phy_device *phydev, ...@@ -779,11 +783,11 @@ static enum amd_xgbe_phy_an amd_xgbe_an_rx_xnp(struct phy_device *phydev,
int ad_reg, lp_reg; int ad_reg, lp_reg;
/* Check Extended Next Page support */ /* Check Extended Next Page support */
ad_reg = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_ADVERTISE); ad_reg = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_XNP);
if (ad_reg < 0) if (ad_reg < 0)
return AMD_XGBE_AN_ERROR; return AMD_XGBE_AN_ERROR;
lp_reg = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_LPA); lp_reg = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_LPX);
if (lp_reg < 0) if (lp_reg < 0)
return AMD_XGBE_AN_ERROR; return AMD_XGBE_AN_ERROR;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment