* usb_serial, ftdi_sio chars_in_buffer blocking tcdrain
@ 2013-06-27 12:17 Andreas Helmcke
2013-06-27 15:20 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Helmcke @ 2013-06-27 12:17 UTC (permalink / raw)
To: linux-serial
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: usb_serial, ftdi_sio chars_in_buffer blocking tcdrain
2013-06-27 12:17 usb_serial, ftdi_sio chars_in_buffer blocking tcdrain Andreas Helmcke
@ 2013-06-27 15:20 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2013-06-27 15:20 UTC (permalink / raw)
To: Andreas Helmcke; +Cc: linux-serial
On Thu, Jun 27, 2013 at 02:17:08PM +0200, Andreas Helmcke wrote:
> 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.
3.8 is no longer supported by the community, can you try the latest
3.10-rc7 release, or 3.9.7, both of which should have some fixes for
this issue?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-27 15:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-27 12:17 usb_serial, ftdi_sio chars_in_buffer blocking tcdrain Andreas Helmcke
2013-06-27 15:20 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox