From: Ed Swarthout Date: Mon, 1 Feb 2010 04:23:22 -0600 Subject: [U-Boot] [PATCH V3 for NET] tsec: do not print Speed: if using netconsole In-Reply-To: <4B667986.5040903@gmail.com> References: <4B667986.5040903@gmail.com> Message-ID: <1265019802-32030-1-git-send-email-Ed.Swarthout@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de CONFIG_NETCONSOLE on the p2020ds is functional with the tsec driver. But the printf in adjust_link() which is called by startup_tsec() called by tsec_init() in tsec.c is making it impossible to use. For example typing 12345 on the netconsole causes the message to be printed for every character: => Speed: 1000, full duplex 1Speed: 1000, full duplex 2Speed: 1000, full duplex 3Speed: 1000, full duplex 4Speed: 1000, full duplex 5Speed: 1000, full duplex Signed-off-by: Ed Swarthout --- drivers/net/tsec.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c index fd49eff..392072f 100644 --- a/drivers/net/tsec.c +++ b/drivers/net/tsec.c @@ -941,10 +941,12 @@ static void adjust_link(struct eth_device *dev) break; } - printf("Speed: %d, %s duplex%s\n", priv->speed, - (priv->duplexity) ? "full" : "half", - (priv->flags & TSEC_FIBER) ? ", fiber mode" : ""); - + if (strcmp(getenv("stdin"), "nc") != 0) { + printf("Speed: %d, %s duplex%s\n", priv->speed, + (priv->duplexity) ? "full" : "half", + (priv->flags & TSEC_FIBER) ? + ", fiber mode" : ""); + } } else { printf("%s: No link.\n", dev->name); } -- 1.6.5