From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Al Borchers <alborchers@steinerpoint.com>
Cc: linux-usb-devel <linux-usb-devel@lists.sourceforge.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: new locking in change_termios breaks USB serial drivers
Date: Fri, 01 Oct 2004 16:49:34 +0100 [thread overview]
Message-ID: <1096645773.21958.54.camel@localhost.localdomain> (raw)
In-Reply-To: <415D84A3.6010105@steinerpoint.com>
On Gwe, 2004-10-01 at 17:24, Al Borchers wrote:
> Its a design decision for the tty layer. You should choose whatever is
> best there and the drivers will have to adapt.
>From a tty layer I don't think there is a motivation to enforce no
sleep. Hopefully nobody has a reason to need to fiddle with termios
data in their IRQ handlers ?
> To correctly support TCSETAW/TCSETSW the USB serial drivers would have to
> have two different versions of set_termios--a non sleeping one to be called
Providing the driver isnt sticking its nose into ->ioctl the tty layer
core already correctly handles TCSETAW for you because it uses
tty_wait_until_sent before issuing the change. You don't have to deal
with that providing you've implemented driver->chars_in_buffer, and
if neccessary ->wait_until_sent.
In a waiting case the driver will get
->chars_in_buffer
until it returns zero
->wait_until_sent
->change_termios
which serializes with respect to the one writer. If you have a writer
during a termios change by another well tough luck, you lose and I've
no intention of changing that behaviour unless someone cites a standard
requiring it.
next prev parent reply other threads:[~2004-10-01 16:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-01 10:40 Al Borchers
2004-10-01 11:36 ` Alan Cox
2004-10-01 16:24 ` Al Borchers
2004-10-01 15:49 ` Alan Cox [this message]
2004-10-01 18:14 ` [linux-usb-devel] " Al Borchers
2004-10-02 15:08 ` Alan Cox
2004-10-02 17:19 ` Al Borchers
2004-10-01 20:15 ` Stuart MacDonald
2004-10-01 17:42 ` 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=1096645773.21958.54.camel@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=alborchers@steinerpoint.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
/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
Powered by JetHome