net: phy: fix marvell phy status reading
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 30 May 2017 15:21:51 +0000 (16:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 2 Nov 2017 06:16:28 +0000 (07:16 +0100)
commit18144201ec726dffd07cebf3df0cd2b799fc9fc0
tree14f57daf22fa97428e97b2ffa606d14d7c758e0c
parent240607692cd84b2ed16b0f346bdaa4f5a787322b
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 <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/net/phy/marvell.c