From: Russell King Date: Tue, 30 May 2017 15:21:51 +0000 (+0100) Subject: net: phy: fix marvell phy status reading X-Git-Tag: archive/raspbian/4.9.30-2+deb9u2+rpi1~4^2~251 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=65792e48079173f7ceede82cca4987031283b530;p=linux-4.9.git net: phy: fix marvell phy status reading commit 898805e0cdf7fd860ec21bf661d3a0285a3defbd upstream. The Marvell driver incorrectly provides phydev->lp_advertising as the logical and of the link partner's advert and our advert. This is incorrect - this field is supposed to store the link parter's unmodified advertisment. This allows ethtool to report the correct link partner auto-negotiation status. Fixes: be937f1f89ca ("Marvell PHY m88e1111 driver fix") Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Amit Pundir Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 21e116e75166..7f01099ae42f 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -1118,8 +1118,6 @@ static int marvell_read_status_page(struct phy_device *phydev, int page) if (adv < 0) return adv; - lpa &= adv; - if (status & MII_M1011_PHY_STATUS_FULLDUPLEX) phydev->duplex = DUPLEX_FULL; else