Skip to contentSkip to conversation

fec: restart autoneg at open instead of init

PATCH In review Eric Bénard 3 participants 4 messages Sep 6, 2012 – Sep 10, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 fec: restart autoneg at open instead of init

this saves some time during boot when ethernet is not needed in barebox

---
 drivers/net/fec_imx.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/fec_imx.c +3 -3
index 599a9b4..2bc06a9 100644
@@ -347,9 +347,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;
 }
 
@@ -363,6 +360,9 @@ static int fec_open(struct eth_device *edev)
 	int ret;
 	u32 ecr;
 
+	if (fec->xcv_type != SEVENWIRE)
+		miidev_restart_aneg(&fec->miidev);
+
 	/*
 	 * Initialize RxBD/TxBD rings
 	 */
Signature · 7 lines
1.7.7.6


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw
Quoted 4 lines · Eric Bénard

this saves some time during boot when ethernet is not needed in barebox

---

Wait I'm going to drop this to have the phy init only at the open of the net on all drivers

Best Regards,
J.

Quoted 35 lines
 drivers/net/fec_imx.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/fec_imx.c +3 -3
index 599a9b4..2bc06a9 100644
@@ -347,9 +347,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;
 }
 
@@ -363,6 +360,9 @@ static int fec_open(struct eth_device *edev)
 	int ret;
 	u32 ecr;
 
+	if (fec->xcv_type != SEVENWIRE)
+		miidev_restart_aneg(&fec->miidev);
+
 	/*
 	 * Initialize RxBD/TxBD rings
 	 */
Signature · 7 lines
1.7.7.6


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

maintainer
#2 lore raw
In reply to Eric Bénard

Hi Eric,

Regarding the phy issue I have the following plan:

- for -next I think Jean-Christophes phylib will be ready to merge. Hopefully it will for for you then again. I think this patch is not necessary anymore then.
- for -master I intend to take the "miidev: fix 1G wrong detection" patch which should solve your problem for the next release.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw

Hi Sascha,

Quoted 8 lines · Sascha Hauer

Regarding the phy issue I have the following plan:

- for -next I think Jean-Christophes phylib will be ready to merge. Hopefully it will for for you then again. I think this patch is not necessary anymore then.
- for -master I intend to take the "miidev: fix 1G wrong detection" patch which should solve your problem for the next release.

OK, I'll give a try to -next when I find some time.

Eric

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox