[U-Boot] [PATCH v2] NS16550: buffer reads

Wolfgang Denk wd at denx.de
Sat Oct 15 21:14:52 CEST 2011


Dear Simon Glass,

In message <CAPnjgZ0s0-P4ubDb=AcB=28otKw+Fi08yLNi2GePoFqBRMn3Gw at mail.gmail.com> you wrote:
>
> Another thought...the problem is that every character we receive we
> echo, so we can of course never get ahead of the workload.  But we can

Even worse, if your input contains any commands that prodce output,
mayeb even lots of output (say "md $addr 10000") then even your
increased buffer size is not going to help you.

> way until there is a let-up. Even worse if one of the commands outputs
> something, since then we might be 20 or 30 characters behind, and
> start dropping things. Even if no commands output anything, delays and
> the U-Boot prompt will create a problem.

Indeed.  And this is why the simple rule applies: always wait for the
next command prompt before sending the next line of input.

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: wd at denx.de
To understand a program you must become  both  the  machine  and  the
program.


More information about the U-Boot mailing list