ar8216: suppress PHY reset for linux 3.14
[librecmc/librecmc.git] / target / linux / mpc85xx / patches-3.14 / 750-phy_reset_anenable.patch
1 From b4da0f2e86748379fc43e82b83458eb054af8d19 Mon Sep 17 00:00:00 2001
2 From: Heiner Kallweit <hkallweit1@gmail.com>
3 Date: Mon, 17 Nov 2014 21:41:56 +0100
4 Subject: net: phy: set BMCR_ANENABLE when phy is reset
5
6 Kernel 3.14 introduced an additional reset of the switch phys
7 causing autonegotiation to be disabled.
8 Change reset command to enable autonegotiation.
9  
10 Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
11 ---
12  drivers/net/phy/phy_device.c | 2 +-
13  1 file changed, 1 insertion(+), 1 deletion(-)
14
15 diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
16 index 25f7419..98445e6 100644
17 --- a/drivers/net/phy/phy_device.c
18 +++ b/drivers/net/phy/phy_device.c
19 @@ -539,7 +539,7 @@ int phy_init_hw(struct phy_device *phydev)
20         if (!phydev->drv || !phydev->drv->config_init)
21                 return 0;
22  
23 -       ret = phy_write(phydev, MII_BMCR, BMCR_RESET);
24 +       ret = phy_write(phydev, MII_BMCR, BMCR_RESET | BMCR_ANENABLE);
25         if (ret < 0)
26                 return ret;
27  
28 -- 
29 2.1.3
30