netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sh_eth: call phy_scan_fixups() after PHY reset
@ 2013-09-14  0:10 Sergei Shtylyov
  2013-09-17 19:44 ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Sergei Shtylyov @ 2013-09-14  0:10 UTC (permalink / raw)
  To: netdev; +Cc: nobuhiro.iwamatsu.yj, linux-sh, laurent.pinchart+renesas

Sometimes the PHY reset that sh_eth_phy_start() does effects the PHY registers
registers values of which are vital for the correct functioning of the driver.
Unfortunately, the existing PHY platform fixup mechanism doesn't help  here as
it only hooks PHY resets done by ioctl() calls. Calling phy_scan_fixups() from
the driver helps here. With a proper platform fixup, this fixes NFS timeouts on
the SH-Mobile Lager board. 

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
This patch is against Dave Miller's 'net.git' tree.
If desired, I can merge it with the Lager platform patch I'll post next, altho
there's only runtime interdependency between them...

 drivers/net/ethernet/renesas/sh_eth.c |    5 +++++
 1 file changed, 5 insertions(+)

Index: net/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net/drivers/net/ethernet/renesas/sh_eth.c
@@ -1701,6 +1701,11 @@ static int sh_eth_phy_start(struct net_d
 
 	/* reset phy - this also wakes it from PDOWN */
 	phy_write(mdp->phydev, MII_BMCR, BMCR_RESET);
+	/* some boards need their registers set to non-default state */
+	ret = phy_scan_fixups(mdp->phydev);
+	if (ret)
+		return ret;
+
 	phy_start(mdp->phydev);
 
 	return 0;

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

end of thread, other threads:[~2013-11-21 17:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-14  0:10 [PATCH] sh_eth: call phy_scan_fixups() after PHY reset Sergei Shtylyov
2013-09-17 19:44 ` David Miller
2013-09-21  0:39   ` Sergei Shtylyov
2013-10-30 20:50     ` Sergei Shtylyov
2013-11-05 20:18       ` Sergei Shtylyov
2013-11-05 20:01         ` David Miller
2013-11-16  0:46           ` Sergei Shtylyov
2013-11-16  0:04             ` Florian Fainelli
2013-11-16  2:00               ` David Miller
2013-11-21 17:48               ` Sergei Shtylyov

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