[U-Boot] [PATCH 3/3] net/tsec: Don't tell the link status if used with netconsole

Sebastian Andrzej Siewior bigeasy at linutronix.de
Fri Mar 23 21:11:19 CET 2012


Since we start/stop the network after each character we see that line
printed a lot.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
---
 drivers/net/tsec.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index 78badfa..9af3c7e 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -235,9 +235,11 @@ static void adjust_link(struct tsec_private *priv, struct phy_device *phydev)
 	out_be32(&regs->ecntrl, ecntrl);
 	out_be32(&regs->maccfg2, maccfg2);
 
-	serial_printf("Speed: %d, %s duplex%s\n", phydev->speed,
-			(phydev->duplex) ? "full" : "half",
-			(phydev->port == PORT_FIBRE) ? ", fiber mode" : "");
+	if (strcmp(getenv("stdout"), "nc"))
+		serial_printf("Speed: %d, %s duplex%s\n", phydev->speed,
+				(phydev->duplex) ? "full" : "half",
+				(phydev->port == PORT_FIBRE) ? ", fiber mode"
+				: "");
 }
 
 #ifdef CONFIG_SYS_FSL_ERRATUM_NMG_ETSEC129
-- 
1.7.9.1



More information about the U-Boot mailing list