a39b6949a88998045d3278e026405a59dc284c12
[openwrt/staging/wigyori.git] / target / linux / mvebu / patches-4.9 / 435-net-phy-fix-marvell-phy-status-reading.patch
1 From: Russell King <rmk+kernel@armlinux.org.uk>
2 Date: Fri, 23 Dec 2016 18:54:01 +0000
3 Subject: [PATCH] net: phy: fix marvell phy status reading
4
5 The Marvell driver incorrectly provides phydev->lp_advertising as the
6 logical and of the link partner's advert and our advert. This is
7 incorrect - this field is supposed to store the link parter's unmodified
8 advertisment.
9
10 This allows ethtool to report the correct link partner auto-negotiation
11 status.
12
13 Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
14 ---
15
16 --- a/drivers/net/phy/marvell.c
17 +++ b/drivers/net/phy/marvell.c
18 @@ -1114,8 +1114,6 @@ static int marvell_read_status_page(stru
19 if (adv < 0)
20 return adv;
21
22 - lpa &= adv;
23 -
24 if (status & MII_M1011_PHY_STATUS_FULLDUPLEX)
25 phydev->duplex = DUPLEX_FULL;
26 else