netconsole loses 2nd character of input
Subsystems (2)
PATCH 1/1 netconsole loses 2nd character of input
Netconsole loses the second character when used as input by either setenv stdin nc or setenv stdin serial,nc if using CONSOLE_CONSOLE_MUX
Before a nc_send_packet() to echo the input, a check is done to see if nc_ether is valid. If its not, it waits for an arp request and then sends the packet (which contains the first character of line to be displayed as output). As part of reaping the arp request, the second character is consumed. We protect this by making the call to NetLoop(NETCONS) between input_recursion.
--- drivers/net/netconsole.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/netconsole.c +2 -0
@@ -184,7 +184,9 @@ static void nc_send_packet(const char *buf, int len)return ;/* inside net loop */ output_packet = buf; output_packet_len = len; + input_recursion =1 ;NetLoop (NETCONS );/* wait for arp reply and send packet */ + input_recursion =0 ; output_packet_len =0 ;return ; }
Signature · 1 line
1.7.1
PATCH 1/1 netconsole loses 2nd character of input
Quoted 11 lines · Suriyan Ramasami
Netconsole loses the second character when used as input by either setenv stdin nc or setenv stdin serial,nc if using
CONSOLE_CONSOLE_MUXBefore a
nc_send_packet()to echo the input, a check is done to see ifnc_etheris valid. If its not, it waits for an arp request and then sends the packet (which contains the first character of line to be displayed as output). As part of reaping the arp request, the second character is consumed. We protect this by making the call to NetLoop(NETCONS) betweeninput_recursion.Signed-off-by Suriyan Ramasami <[email protected]>
This looks good to me... I'll pull it in shortly.
PATCH 1/1 netconsole loses 2nd character of input
In reply to Suriyan RamasamiQuoted 10 lines · Suriyan Ramasami
Netconsole loses the second character when used as input by either setenv stdin nc or setenv stdin serial,nc if using
CONSOLE_CONSOLE_MUXBefore a
nc_send_packet()to echo the input, a check is done to see ifnc_etheris valid. If its not, it waits for an arp request and then sends the packet (which contains the first character of line to be displayed as output). As part of reaping the arp request, the second character is consumed. We protect this by making the call to NetLoop(NETCONS) betweeninput_recursion.
Quoted 2 lines
Signed-off-by Suriyan Ramasami <[email protected]>Acked-by Joe Hershberger <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131108/80d9cfef/attachment.pgp>