public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* HW Flow control in serial.c???
@ 2003-02-04 12:26 Steven Scholz
  0 siblings, 0 replies; only message in thread
From: Steven Scholz @ 2003-02-04 12:26 UTC (permalink / raw)
  To: linux-serial

Hi there,

while playing around with some serial device using RTS/CTS flow control I 
noticed the following behavior:

When the device activates it's CTS to signal that it can't take more date, the 
sender (i.e. drivers/char/serial.c) is still sending up to 16 (!) Bytes! I 
assume this is the contents of the 16550's FIFO.

Is it a bug or a feature?

Looking at the code drivers/char/serial.c and at the data sheet of a 16C550 
shows that to enable the (real) HW flow control one has to set the bit AFE (auto 
flow control enable) in the MCR register. But this is not done in serial.c.

Please look at drivers/char/mxser.c

...
#define         UART_MCR_AFE            0x20
...
         if (cflag & CRTSCTS) {
                 info->flags |= ASYNC_CTS_FLOW;
                 info->IER |= UART_IER_MSI;
                 if (info->type == PORT_16550A)
                         info->MCR |= UART_MCR_AFE;
         } else {
                 info->flags &= ~ASYNC_CTS_FLOW;
         }
...

I think this it the right way to do it.

BTW I am talking about linux 2.4.20.

Since I am not on the list so please CC me.

Thanks a million,

Steven Scholz




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-02-04 10:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-04 12:26 HW Flow control in serial.c??? Steven Scholz

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