setserial -> serial_core / 8250 interaction



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/



Relevant Pages

  • Re: Make serial data available over TCP
    ... > port to the fifo. ... > connection is made would read from the fifo and write to the network ... Run this program with stdin redirected from the serial port. ... You also need to decide what to do if a client is too slow to keep up. ...
    (comp.unix.programmer)
  • Re: Interrupt-driven serial comm for Linux ?
    ... baudrate and without handshaking, all incoming data beyond the UART's ... FIFOs buffer size) from the serial port without losing bits. ... the FIFO. ... I have worked with idle handlers before ...
    (comp.os.linux.development.apps)
  • DeviceSerial1 was really a serial port, fifo detected
    ... wiped hard drive and reloaded winxp pro. ... Event Type: Information ... While validating that \Device\Serial1 was really a serial port, ... The fifo will be used. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Serial IR receiver problem
    ... is preventing the serial port driver from emptying the 16550A FIFO ... before it wraps, resulting in lost characters. ... the serial port driver's interrupt handler is ...
    (comp.home.automation)