public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Serial driver hangs
@ 2004-09-28 15:34 Roland Caßebohm
  2004-09-28 21:10 ` Paul Fulghum
  0 siblings, 1 reply; 26+ messages in thread
From: Roland Caßebohm @ 2004-09-28 15:34 UTC (permalink / raw)
  To: linux-kernel

Hi,

my platform is uClinux kernel 2.4.24 with an ARM with PCI and 
a 2 port VSCOM 200I PCI card.

I use the serial driver with very high load. With my 
application sends and receives on two ports with 921600 baud.

After a while the driver hangs in an endless loop in the 
interrupt routine.
As I can see, the bit TTY_DONT_FLIP in tty->flags is set, so 
the receive-buffer can't be flipped. In receive_chars() all 
ports are checked for received bytes, but if the buffer is 
full and can't be flipped, no byte are read from the UART and 
the interrupt will never go inactive.

>>>>>>>>>>>>
    do {
        if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
            tty->flip.tqueue.routine((void *) tty);
            if (tty->flip.count >= TTY_FLIPBUF_SIZE)
                return;     // if TTY_DONT_FLIP is set
        }
        ch = serial_inp(info, UART_RX);
        *tty->flip.char_buf_ptr = ch;
        icount->rx++;
>>>>>>>>>>>>

I have tried just to read all byte left in the FIFO of the 
UART in that case and throw them away.

>>>>>>>>>>>>
            if (tty->flip.count >= TTY_FLIPBUF_SIZE)
            {
                do {
                    ch = serial_inp(info, UART_RX);
                    icount->overrun++;
                    *status = serial_inp(info, UART_LSR);
                } while (*status & UART_LSR_DR);
                return;     // if TTY_DONT_FLIP is set
            }
>>>>>>>>>>>>

This is working but would probably not the best way, because 
there could be enough place in the other flip buffer. Maybe 
it is possible to disable the receive interrupt of the UART 
till the receive routine read_chan(), which sets 
TTY_DONT_FLIP, releases the buffer.

Thanks for any help,
Roland
-- 
___________________________________________________

VS Vision Systems GmbH, Industrial Image Processing
Dipl.-Ing. Roland Caßebohm
Aspelohe 27A, D-22848 Norderstedt, Germany
http://www.visionsystems.de
___________________________________________________

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2004-10-01 20:46 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-28 15:34 Serial driver hangs Roland Caßebohm
2004-09-28 21:10 ` Paul Fulghum
2004-09-28 21:16   ` Russell King
2004-09-28 23:03     ` Paul Fulghum
2004-09-28 22:12       ` Alan Cox
2004-09-29  1:12         ` Paul Fulghum
2004-09-29 13:09           ` Roland Caßebohm
2004-09-29 13:17             ` Paul Fulghum
2004-09-29 14:07               ` Roland Caßebohm
2004-09-29 14:25                 ` Paul Fulghum
2004-09-30 16:16                   ` Roland Caßebohm
2004-09-30 19:09                     ` Paul Fulghum
2004-09-30 18:34                       ` Alan Cox
2004-09-30 19:51                         ` Paul Fulghum
2004-09-30 19:59                           ` Russell King
2004-09-30 20:05                             ` Paul Fulghum
2004-09-30 20:30                               ` Paul Fulghum
2004-09-30 20:10                                 ` Alan Cox
2004-09-30 21:25                                   ` Paul Fulghum
2004-10-01  0:47                                     ` Paul Fulghum
2004-10-01 15:22                                     ` Roland Caßebohm
2004-10-01 16:06                                       ` Paul Fulghum
2004-10-01 20:13                                   ` Stuart MacDonald
2004-10-01 20:36                                     ` Paul Fulghum
2004-09-29 14:13             ` Paul Fulghum
2004-10-01 15:25               ` Roland Caßebohm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox