From: Oliver Neukum <oliver@neukum.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, Greg KH <greg@kroah.com>,
Kernel development list <linux-kernel@vger.kernel.org>,
USB list <linux-usb@vger.kernel.org>
Subject: Re: [PATCH 4/5] usb_serial: Kill port mutex
Date: Thu, 8 Oct 2009 17:27:11 +0200 [thread overview]
Message-ID: <200910081727.11745.oliver@neukum.org> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0910081054300.2986-100000@iolanthe.rowland.org>
Am Donnerstag, 8. Oktober 2009 16:58:39 schrieb Alan Stern:
> On Thu, 8 Oct 2009, Oliver Neukum wrote:
> > Am Mittwoch, 7. Oktober 2009 23:34:12 schrieb Alan Stern:
> > > Other schemes could work, but to me it seems simplest to rely on a flag
> > > protected by a spinlock. The flag would mean "URBs are supposed to be
> > > queued unless we are suspended". It would be set by open and
> > > unthrottle, and cleared by close and throttle.
> >
> > 1. Why a spinlock?
>
> Because the amount of work involved seems too small for a mutex. But
> you could use a mutex if you wanted, since everything occurs in process
> context.
We have to submit URBs under that lock.
> > 2. Can we get by with only one flag?
>
> If all you want to do is answer a single question ("Should URBs be
> submitted") then a single flag should be all you need. Why, do you
> think more information will be necessary? You can always add more.
We have at least three reasons URBs should not be submitted.
- closure
- throttling
- suspension
Resume() should not submit if either closure or throttling are active,
neither should unthrottle() resubmit if closure or suspension are active.
Regards
Oliver
next prev parent reply other threads:[~2009-10-08 15:26 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-06 15:05 [PATCH 0/5] tty_port_open Alan Cox
2009-10-06 15:06 ` [PATCH 1/5] tty_port: add "tty_port_open" helper Alan Cox
2009-10-06 15:06 ` [PATCH 2/5] tty_port: coding style cleaning pass Alan Cox
2009-10-06 15:06 ` [PATCH 3/5] usb_serial: Use the shutdown() operation Alan Cox
2009-10-06 15:06 ` [PATCH 4/5] usb_serial: Kill port mutex Alan Cox
2009-10-07 5:02 ` Oliver Neukum
2009-10-07 16:03 ` Alan Stern
2009-10-07 16:10 ` Oliver Neukum
2009-10-07 16:34 ` Alan Stern
2009-10-07 16:46 ` Alan Cox
2009-10-07 17:23 ` Alan Stern
2009-10-07 18:25 ` Alan Cox
2009-10-07 18:52 ` Alan Stern
2009-10-07 20:56 ` Oliver Neukum
2009-10-07 21:02 ` Alan Cox
2009-10-07 21:34 ` Alan Stern
2009-10-08 13:43 ` Oliver Neukum
2009-10-08 14:58 ` Alan Stern
2009-10-08 15:27 ` Oliver Neukum [this message]
2009-10-08 16:58 ` Alan Stern
2009-10-08 20:06 ` Alan Stern
2009-10-08 20:40 ` Oliver Neukum
2009-10-08 21:19 ` Alan Cox
2009-10-08 21:31 ` Alan Stern
2009-10-08 22:31 ` Alan Cox
2009-10-08 11:37 ` Oliver Neukum
2009-10-06 15:06 ` [PATCH 5/5] opticon: Fix resume logic Alan Cox
2009-10-06 21:12 ` Oliver Neukum
2009-10-06 22:23 ` Alan Cox
2009-10-07 15:56 ` Johan Hovold
2009-10-07 16:01 ` Oliver Neukum
2009-10-07 15:56 ` Alan Stern
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=200910081727.11745.oliver@neukum.org \
--to=oliver@neukum.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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