]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.4.75/net-phy-fix-marvell-phy-status-reading.patch
5.0-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.4.75 / net-phy-fix-marvell-phy-status-reading.patch
1 From 898805e0cdf7fd860ec21bf661d3a0285a3defbd Mon Sep 17 00:00:00 2001
2 From: Russell King <rmk+kernel@armlinux.org.uk>
3 Date: Tue, 30 May 2017 16:21:51 +0100
4 Subject: net: phy: fix marvell phy status reading
5
6 From: Russell King <rmk+kernel@armlinux.org.uk>
7
8 commit 898805e0cdf7fd860ec21bf661d3a0285a3defbd upstream.
9
10 The Marvell driver incorrectly provides phydev->lp_advertising as the
11 logical and of the link partner's advert and our advert. This is
12 incorrect - this field is supposed to store the link parter's unmodified
13 advertisment.
14
15 This allows ethtool to report the correct link partner auto-negotiation
16 status.
17
18 Fixes: be937f1f89ca ("Marvell PHY m88e1111 driver fix")
19 Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
20 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
21 Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
22 Signed-off-by: David S. Miller <davem@davemloft.net>
23 Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25
26 ---
27 drivers/net/phy/marvell.c | 2 --
28 1 file changed, 2 deletions(-)
29
30 --- a/drivers/net/phy/marvell.c
31 +++ b/drivers/net/phy/marvell.c
32 @@ -822,8 +822,6 @@ static int marvell_read_status(struct ph
33 phydev->lp_advertising = mii_stat1000_to_ethtool_lpa_t(lpagb) |
34 mii_lpa_to_ethtool_lpa_t(lpa);
35
36 - lpa &= adv;
37 -
38 if (status & MII_M1011_PHY_STATUS_FULLDUPLEX)
39 phydev->duplex = DUPLEX_FULL;
40 else