Dear Jim Lin,
In message <[email protected]> you wrote:
> TFTP booting is slow when a USB keyboard is installed and
> stdin has usbkbd added.
> This fix is to change Ctrl-C polling for USB keyboard to every second
> when NET transfer is running.
>
> Signed-off-by: Jim Lin <[email protected]>
The sequence of your patches is wrong; you must reverse it: as is,
with only patch 1/2 applied, you will get compile errors because
net_busy_flag is undefined. This breaks bisectability.
Please switch the order of your patches.
> + /*
> + * If net_busy_flag is 1, NET transfer is running,
> + * then we check key pressed every second to improve
> + * TFTP booting performance.
> + */
> + if (net_busy_flag) {
> + if (get_timer(kbd_testc_tms) < CONFIG_SYS_HZ)
> + return 0;
> + else
> + kbd_testc_tms = get_timer(0);
> + }
When first entering this code, the variable kbd_testc_tms is
(implicitly) initialized as zero; later, for example when running
multiple network commands, the last used value (i. e. a random number)
is used. So strictly speaking the comment above is incorrect, as you
don't test for key presses "every second" - the first test may happen
much earlier (even immediately). I think this should be explained in
the comment to prevent incorrect expectations on the behaviour.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
Eureka! -- Archimedes
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot