HW Flow control in serial.c???
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