setserial -> serial_core / 8250 interaction

From: George McCollister
Date: Wed Jul 18 2007 - 11:43:22 EST


I've recently found (using 2.6.21.4) that configuring a serial ports
(ST16654) which use the 8250 driver using setserial results in the
UART's FIFOs being disabled (unless you specify autoconfig).

The problem is that setserial doesn't fill out xmit_fifo_size when
calling TIOCSSERIAL to set the port type. There doesn't appear to be any
provision to set the port type and have 8250 use the default fifo_size
value for the selected FIFO from uart_config.

The result is that fifo_size remains 0 and the fifo is disabled. So, I
believe that anyone using setserial to configure a serial port (unless
autoconfig is used) will have very poor serial port performance (I did,
thats how I ran across this).

I haven't been able to think of a cure all solution without introducing
some pretty nasty changes. You could argue that setserial should set
xmit_fifo_size, but it seems unnecessary to require a user level program
to have knowledge of the FIFO sizes for all of the different UARTS. I'm
going to change my copy of 8250.c to always use fifo_size from
uart_config, but some people may not find this acceptable.

Maybe I'm missing something here, but I wanted to bring it up in case
its actually affecting other people.

I'm not subscribed to the list so if you reply please CC to my address.

Regards,
George McCollister


This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately and delete
the original. Any other use of the email by you is prohibited.


This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately and delete
the original. Any other use of the email by you is prohibited.
-
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/