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

Simon Glass sjg at chromium.org
Sun Oct 16 06:46:39 CEST 2011


Hi Wolfgang,

On Sat, Oct 15, 2011 at 12:14 PM, Wolfgang Denk <wd at denx.de> wrote:
> 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.

It helps a little - provided there are no more than 250 characters
more 'serial input' after the md command, all is well. But I think
this example is a little contrived.

>
>> 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.

I feel this is a painful restriction. I see no indication of this
limitation anywhere on the command line, no error or warning, etc. It
is common to want to paste in new bootargs, new network parameters,
new environment variables. U-Boot has a command line which purports to
support this, and with a fairly straightforward patch and in the
majority of cases, it can.

Yes this is a minor point, but it does bite people, and usability is important.

Regards,
Simon

>
> 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