netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] net/fs_enet: send a reset request to the PHY on init
@ 2009-09-02 11:04 Sebastian Andrzej Siewior
  2009-09-03 16:48 ` Grant Likely
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2009-09-02 11:04 UTC (permalink / raw)
  To: Pantelis Antoniou, Vitaly Bordug; +Cc: linuxppc-dev, netdev

Usually u-boot sends a phy request in its network init routine. An uboot
without network support doesn't do it and I endup without working
network. I still can switch between 10/100Mbit (according to the LED on
the hub and phy registers) but I can't send or receive any data.

At this point I'm not sure if the PowerON Reset takes the PHY a few
nsecs too early out of reset or if this reset is required and everyone
relies on U-boot performing this reset.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
This is done on a custom mpc512x board. Unfortunately I don't have other
boards to check. The PHY is a AMD Am79C874, phylib uses the generic one.

 drivers/net/fs_enet/fs_enet-main.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index ee15402..a3c962b 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -823,7 +823,8 @@ static int fs_init_phy(struct net_device *dev)
 	}
 
 	fep->phydev = phydev;
-
+	phy_write(phydev, MII_BMCR, BMCR_RESET);
+	udelay(1);
 	return 0;
 }
 
-- 
1.6.4.GIT

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

end of thread, other threads:[~2009-09-04 15:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-02 11:04 [RFC] net/fs_enet: send a reset request to the PHY on init Sebastian Andrzej Siewior
2009-09-03 16:48 ` Grant Likely
2009-09-04 15:38   ` Sebastian Andrzej Siewior
2009-09-04 15:45     ` Grant Likely

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