
Dear Ed Swarthout,
In message 1265019802-32030-1-git-send-email-Ed.Swarthout@freescale.com you wrote:
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 Ed.Swarthout@freescale.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 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" : "");
}
I think this status of the console connection should be latched into a variable (in tsec_init() ?) so we can avoid the (pretty expensive) scanning of the environment for every transmitted character.
Best regards,
Wolfgang Denk