diff mbox series

[v1] net: thunderx: start phy before starting autonegotiation

Message ID 20191204172351.29709-1-ykaukab@suse.de (mailing list archive)
State Mainlined
Commit a350d2e7adbb57181d33e3aa6f0565632747feaa
Headers show
Series [v1] net: thunderx: start phy before starting autonegotiation | expand

Commit Message

Mian Yousaf Kaukab Dec. 4, 2019, 5:23 p.m. UTC
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.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
---
v1: 
-Remove call to phy_start_aneg() as suggested by Andrew Lunn
-Fix reference to patch in change log as suggested by Sergei Shtylyov

 drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Lunn Dec. 4, 2019, 5:30 p.m. UTC | #1
On Wed, Dec 04, 2019 at 06:23:51PM +0100, Mian Yousaf Kaukab wrote:
> 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.
> 
> Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
> ---
> v1: 

This should really be v2.

You should add fixes: tag

And the subject line should indicate which tree this is for:

[PATCH v2 net] net: thunderx: start phy before starting autonegotiation

https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html

       Andrew
diff mbox series

Patch

diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
index 1e09fdb63c4f..c4f6ec0cd183 100644
--- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
+++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
@@ -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;
 	}