From: Andreas Helmcke <ahe@helmcke.name>
To: linux-serial@vger.kernel.org
Subject: usb_serial, ftdi_sio chars_in_buffer blocking tcdrain
Date: Thu, 27 Jun 2013 14:17:08 +0200 [thread overview]
Message-ID: <51CC2D44.9090400@helmcke.name> (raw)
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
next reply other threads:[~2013-06-27 12:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-27 12:17 Andreas Helmcke [this message]
2013-06-27 15:20 ` usb_serial, ftdi_sio chars_in_buffer blocking tcdrain Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51CC2D44.9090400@helmcke.name \
--to=ahe@helmcke.name \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox