From: Paul Fulghum <paulkf@microgate.com>
To: Rick Warner <rick@microway.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: serial port regression caused by "Char: tty_ioctl, use wait_event_interruptible_timeout" patch
Date: Tue, 05 Feb 2008 14:18:51 -0600 [thread overview]
Message-ID: <47A8C4AB.3030301@microgate.com> (raw)
In-Reply-To: <200802051402.26816.rick@microway.com>
Rick Warner wrote:
> I narrowed down the problem doing a binary search on git snapshots between .22
> and .23, and found the breakage between git6 and git7. Further isolating it
> found the patch mentioned in the subject to be the cause. I reversed the
> patch in the .23 source and it now works properly.
>
> Should the code be reverted back as I did, or is there something I should
> change in our userspace code that reads from the serial port to correct it
> instead?
Instead of reverting the patch can you try modifying
this part of the patch:
+ if (wait_event_interruptible_timeout(tty->write_wait,
+ !tty->driver->chars_in_buffer(tty), timeout))
+ return;
by changing it to:
+ if (wait_event_interruptible_timeout(tty->write_wait,
+ !tty->driver->chars_in_buffer(tty), timeout) < 0)
+ return;
It looks like the patch changed the behavior of
tty_wait_until_sent by not calling the driver
specific wait_until_sent if a timeout occurs.
--
Paul Fulghum
Microgate Systems, Ltd.
next prev parent reply other threads:[~2008-02-05 20:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-05 19:02 serial port regression caused by "Char: tty_ioctl, use wait_event_interruptible_timeout" patch Rick Warner
2008-02-05 20:18 ` Paul Fulghum [this message]
2008-02-05 20:53 ` Paul Fulghum
2008-02-05 21:32 ` Rick Warner
2008-02-05 21:37 ` Paul Fulghum
2008-02-05 21:59 ` Jiri Slaby
2008-02-05 22:27 ` Paul Fulghum
2008-02-05 22:33 ` Jiri Slaby
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=47A8C4AB.3030301@microgate.com \
--to=paulkf@microgate.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rick@microway.com \
/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