Subject: Re: Is it normal for serial ports to drop characters at the end?

From: Marcus Sundberg <[email-masked]>
Date: 03 May 2000 22:05:37 +0200

Dan Malek <[email-masked]> writes:

> Marcus Sundberg wrote:
>
> > Right on target.
> > rs_8xx_wait_until_sent() will wait for the *first* buffer descriptor
> > to be finished, instead of waiting for the last one as it should.
> > This patch fixes that problem:
>
> That's part of it, but we also need to perform a graceful shutdown
> of the port so we wait until the hardware FIFOs are empty.  Waiting
> for the buffer descriptor just means the CPM moved the last data
> from the buffer, not that it has gone out the wire.

Sure, but the above "works perfect for me(tm)", at least in 9600bps.

> I thought I did this once.....but, why are you closing devices anyway :-).

I think I experienced this first when using the busybox init
implementation, which IIRC opens and closes /dev/console for each
message. Otherwise I've never seen it in a real application.

/Marcus
--
-------------------------------+-----------------------------------
        Marcus Sundberg        |       Phone: +46 707 452062
  Embedded Systems Consultant  |      Email: [email-masked]
       Cendio Systems AB       |       http://www.cendio.com

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/