[PATCH v2 10/10] fec_imx: restart aneg at open and not at init
Eric Bénard
eric at eukrea.com
Fri May 18 03:41:45 EDT 2012
else we can get a 1 second timeout at each boot since
"6cbecc4 net: miidev: properly check for MII reset"
Signed-off-by: Eric Bénard <eric at eukrea.com>
---
drivers/net/fec_imx.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c
index 08cd761..eb0ca44 100644
--- a/drivers/net/fec_imx.c
+++ b/drivers/net/fec_imx.c
@@ -335,9 +335,6 @@ static int fec_init(struct eth_device *dev)
/* size of each buffer */
writel(FEC_MAX_PKT_SIZE, fec->regs + FEC_EMRBR);
- if (fec->xcv_type != SEVENWIRE)
- miidev_restart_aneg(&fec->miidev);
-
return 0;
}
@@ -350,6 +347,9 @@ static int fec_open(struct eth_device *edev)
struct fec_priv *fec = (struct fec_priv *)edev->priv;
int ret;
+ if (fec->xcv_type != SEVENWIRE)
+ miidev_restart_aneg(&fec->miidev);
+
/*
* Initialize RxBD/TxBD rings
*/
--
1.7.7.6
More information about the barebox
mailing list