The problem description:
The Ethernet link operation mode printing (such as "Speed: 1000,
full duplex") accomplishes every key typing when communicating via
netconsole to the mpc834x based board. The string is printed by
adjust_link() routine of tsec.c, which in turn is part of the
eth_init routine called at every netloop entry.

The solution:
Do not print the string when compiled with CONFIG_NETCONSOLE and
stdin or stdout is set to "nc"

Signed-off-by: Michael Zaidman <michael.zaid...@gmail.com>
---
 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 3f74118..87093e6 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -847,10 +847,12 @@ static void adjust_link(struct eth_device *dev)
                        printf("%s: Speed was bad\n", dev->name);
                        break;
                }
-
-               printf("Speed: %d, %s duplex\n", priv->speed,
-                      (priv->duplexity) ? "full" : "half");
-
+#ifdef CONFIG_NETCONSOLE
+               if ((strcmp(getenv("stdin"),"nc") != 0) && 
+                       (strcmp(getenv("stdout"),"nc") != 0))
+#endif
+                       printf("Speed: %d, %s duplex\n", priv->speed,
+                                  (priv->duplexity) ? "full" : "half");
        } else {
                printf("%s: No link.\n", dev->name);
        }
-- 
1.6.3.3

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to