usb_serial, ftdi_sio chars_in_buffer blocking tcdrain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

after upgrading from Kernel 3.5 to Kernel 3.8 (actually updating kubuntu 12.10 to 13.04) I am having the problem, that
some times tcdrain does not return.

To be more precise:
I am having an application which polls some devices on a RS485-bus. It does this by sending 3 Bytes, calling tcdrain and
then waiting for the answer / timeout. This worked flawlessly on kernels up to 3.5. With kernel 3.8 regularly the
application hangs because tcdrain does not return.

dmesg-log with usbserial and ftdi_sio with debug on:

Jun 26 17:28:03 tupai kernel: [25094.164268] ftdi_sio ttyUSB0: ftdi_get_modem_status - 0x0260
Jun 26 17:28:03 tupai kernel: [25094.164274] ftdi_sio ttyUSB0: ftdi_chars_in_buffer - 0
Jun 26 17:28:03 tupai kernel: [25094.164280] tty ttyUSB0: serial_write_room - port 0
Jun 26 17:28:03 tupai kernel: [25094.164300] tty ttyUSB0: serial_write - port 0, 3 byte(s)
Jun 26 17:28:03 tupai kernel: [25094.164314] tty ttyUSB0: serial_chars_in_buffer - port 0
Jun 26 17:28:03 tupai kernel: [25094.164318] ftdi_sio ttyUSB0: ftdi_chars_in_buffer - 3
Jun 26 17:28:03 tupai kernel: [25094.164322] tty ttyUSB0: serial_chars_in_buffer - port 0
Jun 26 17:28:03 tupai kernel: [25094.164326] ftdi_sio ttyUSB0: ftdi_chars_in_buffer - 3
Jun 26 17:28:03 tupai kernel: [25094.164363] tty ttyUSB0: usb_serial_port_work - port 0
Jun 26 17:28:03 tupai kernel: [25094.164384] tty ttyUSB0: serial_chars_in_buffer - port 0
Jun 26 17:28:03 tupai kernel: [25094.164535] ftdi_sio ttyUSB0: ftdi_get_modem_status - 0x0200
Jun 26 17:28:03 tupai kernel: [25094.164541] ftdi_sio ttyUSB0: ftdi_chars_in_buffer - 1

--> Application blocks (tcdrain does not return).

My guess is, that the waitqueue which is used in the call to wait_event_interruptible_timeout in the function
tty_wait_until_sent does not reliably get triggered, when the modem status changes the FTDI_RS_TEMT flag.

Is this a know bug? Is this already addressed by the changes which are discussed in the thread "Re: Regression: ftdi_sio
is slow (since Wed Oct 10 15:05:06 2012)" ?


   Andreas
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux