Re: Serial driver hangs

From: Roland CaÃebohm
Date: Wed Sep 29 2004 - 08:13:56 EST


Hi,

Am Mittwoch, 29. September 2004 03:12 schrieb Paul Fulghum:
> On Tue, 2004-09-28 at 17:12, Alan Cox wrote:
> > We have throttle()/unthrottle(). Drivers also know if
> > they can't push data.
>
> Yes, though these are manipulated by the ldisc
> in relation to the ldisc receive buffer.
> Coordinating the use of these functions between
> a buffering layer (like the flip buffer) and
> the ldisc would require each to have
> knowledge of the other's state to know who
> calls what and when (yuck).
>
> But much of that may go away when...
>
> > TTY_DONT_FLIP has to die.
>
> *bang*
>
> Until then, flushing the UART receive
> FIFO and dropping the bytes (and updating
> overrun stat) seems a reasonable short term
> solution to stop the machine from locking up
> while leaving the device in a recoverable state.
>
> We can even mark it with *FIXME* in a comment.
> That always seems to work :-)

I have made a little test, at which the receive interrupt is
disabled in that state. It seems to be no improvement to the
solution of just trow away the bytes of the FIFO. In both
cases characters got lost.

So I think you are right, it would be the best to make the
simple solution with flushing the UART receive FIFO till the
flip buffer implementation will be reworked.

Roland
--
___________________________________________________

VS Vision Systems GmbH, Industrial Image Processing
Dipl.-Ing. Roland CaÃebohm
Aspelohe 27A, D-22848 Norderstedt, Germany
Mail: roland.cassebohm@xxxxxxxxxxxxxxxx
http://www.visionsystems.de
___________________________________________________
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/