net: thunderx: start phy before starting autonegotiation
authorMian Yousaf Kaukab <ykaukab@suse.de>
Thu, 5 Dec 2019 09:41:16 +0000 (10:41 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Dec 2019 20:10:40 +0000 (12:10 -0800)
Since commit 2b3e88ea6528 ("net: phy: improve phy state checking")
phy_start_aneg() expects phy state to be >= PHY_UP. Call phy_start()
before calling phy_start_aneg() during probe so that autonegotiation
is initiated.

As phy_start() takes care of calling phy_start_aneg(), drop the explicit
call to phy_start_aneg().

Network fails without this patch on Octeon TX.

Fixes: 2b3e88ea6528 ("net: phy: improve phy state checking")
Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/thunder/thunder_bgx.c

index 1e09fdb63c4fbfd95d219935f364c7ce4b29ac59..c4f6ec0cd183ea280d294f0c423772d30406dba4 100644 (file)
@@ -1115,7 +1115,7 @@ static int bgx_lmac_enable(struct bgx *bgx, u8 lmacid)
                                       phy_interface_mode(lmac->lmac_type)))
                        return -ENODEV;
 
-               phy_start_aneg(lmac->phydev);
+               phy_start(lmac->phydev);
                return 0;
        }