linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2] net: thunderx: start phy before starting autonegotiation
@ 2019-12-05  9:41 Mian Yousaf Kaukab
  2019-12-05 12:59 ` Andrew Lunn
  2019-12-05 20:11 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Mian Yousaf Kaukab @ 2019-12-05  9:41 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, linux-arm-kernel, tharvey, davem, rric, sgoutham,
	sergei.shtylyov, andrew, Mian Yousaf Kaukab

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>
---
v2:
-Add fixes tag and net tree as suggested by Andrew Lunn
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(-)

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;
 	}
 
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net v2] net: thunderx: start phy before starting autonegotiation
  2019-12-05  9:41 [PATCH net v2] net: thunderx: start phy before starting autonegotiation Mian Yousaf Kaukab
@ 2019-12-05 12:59 ` Andrew Lunn
  2019-12-05 20:11 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2019-12-05 12:59 UTC (permalink / raw)
  To: Mian Yousaf Kaukab
  Cc: netdev, linux-kernel, linux-arm-kernel, tharvey, davem, rric,
	sgoutham, sergei.shtylyov

On Thu, Dec 05, 2019 at 10:41:16AM +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.
> 
> Fixes: 2b3e88ea6528 ("net: phy: improve phy state checking")
> Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net v2] net: thunderx: start phy before starting autonegotiation
  2019-12-05  9:41 [PATCH net v2] net: thunderx: start phy before starting autonegotiation Mian Yousaf Kaukab
  2019-12-05 12:59 ` Andrew Lunn
@ 2019-12-05 20:11 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-12-05 20:11 UTC (permalink / raw)
  To: ykaukab
  Cc: netdev, linux-kernel, linux-arm-kernel, tharvey, rric, sgoutham,
	sergei.shtylyov, andrew

From: Mian Yousaf Kaukab <ykaukab@suse.de>
Date: Thu,  5 Dec 2019 10:41:16 +0100

> 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>

Applied and queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-05 20:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05  9:41 [PATCH net v2] net: thunderx: start phy before starting autonegotiation Mian Yousaf Kaukab
2019-12-05 12:59 ` Andrew Lunn
2019-12-05 20:11 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).