All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v1 1/1] net: fec: init MAC prior to mii bus probe
@ 2015-06-23  7:32 Fugang Duan
  2015-06-23 14:11 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Fugang Duan @ 2015-06-23  7:32 UTC (permalink / raw)
  To: davem; +Cc: netdev, stephen, b38611, Frank.Li

Below case causes mii bus probe failed:
ifconfig eth0 down -> suspend/resume with Mega/fax mix off -> ifconfig eth0 up

In i.MX6SX/i.MX7D chip, Mega/fast mix off feature is supported that means most of
SOC power will be off including ENET MAC for power saving. Once ENET MAC power
off, all initialized MAC registers reset to default, so in the case, it must
init MAC prior to mii bus probe.

Signed-off-by: Fugang Duan <B38611@freescale.com>
---
 drivers/net/ethernet/freescale/fec_main.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index bf4cf3f..e464aea 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2856,12 +2856,14 @@ fec_enet_open(struct net_device *ndev)
 	if (ret)
 		goto err_enet_alloc;
 
+	/* Init MAC prior to mii bus probe */
+	fec_restart(ndev);
+
 	/* Probe and connect to PHY when open the interface */
 	ret = fec_enet_mii_probe(ndev);
 	if (ret)
 		goto err_enet_mii_probe;
 
-	fec_restart(ndev);
 	napi_enable(&fep->napi);
 	phy_start(fep->phy_dev);
 	netif_tx_start_all_queues(ndev);
-- 
1.7.8

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

* Re: [PATCH net-next v1 1/1] net: fec: init MAC prior to mii bus probe
  2015-06-23  7:32 [PATCH net-next v1 1/1] net: fec: init MAC prior to mii bus probe Fugang Duan
@ 2015-06-23 14:11 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-06-23 14:11 UTC (permalink / raw)
  To: B38611; +Cc: netdev, stephen, Frank.Li

From: Fugang Duan <B38611@freescale.com>
Date: Tue, 23 Jun 2015 15:32:51 +0800

> Below case causes mii bus probe failed:
> ifconfig eth0 down -> suspend/resume with Mega/fax mix off -> ifconfig eth0 up
> 
> In i.MX6SX/i.MX7D chip, Mega/fast mix off feature is supported that means most of
> SOC power will be off including ENET MAC for power saving. Once ENET MAC power
> off, all initialized MAC registers reset to default, so in the case, it must
> init MAC prior to mii bus probe.
> 
> Signed-off-by: Fugang Duan <B38611@freescale.com>

Applied.

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

end of thread, other threads:[~2015-06-23 13:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-23  7:32 [PATCH net-next v1 1/1] net: fec: init MAC prior to mii bus probe Fugang Duan
2015-06-23 14:11 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.