From: David Brownell <david-b@pacbell.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <greg@kroah.com>,
linux-usb-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [linux-usb-devel] ehci calling put_device from irq handler
Date: Wed, 18 Jan 2006 14:18:35 -0800 [thread overview]
Message-ID: <200601181418.35590.david-b@pacbell.net> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0601181648010.4974-100000@iolanthe.rowland.org>
On Wednesday 18 January 2006 1:54 pm, Alan Stern wrote:
> On Wed, 18 Jan 2006, Greg KH wrote:
>
> > We can not call put_device() from irq context :(
> >
> > I added a "might_sleep()" to the driver core and get the following from
> > the ehci driver. Any thoughts?
>
> In principle the put_device and corresponding get_device calls aren't
> needed. We don't release a usb_device structure until after disabling all
> its endpoints, and disabling an endpoint will wait until all the URBs for
> that endpoint have completed. So there's no reason to keep a reference to
> the device structure for each URB.
>
> I see that uhci-hcd is guilty of the same thing (reference acquired for
> each QH, released while holding a spinlock). Probably each of the
> host controller drivers is.
I think it dated from the days before we had any mechanism for
disabling endpoints properly, and was (important!) insurance
against the inevitable "driver disconnect() didn't work right"
class of bugs.
So it should be safe to remove those calls now.
- Dave
prev parent reply other threads:[~2006-01-18 22:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-18 21:29 Greg KH
2006-01-18 21:54 ` [linux-usb-devel] " Alan Stern
2006-01-18 22:13 ` Greg KH
2006-01-18 22:18 ` David Brownell [this message]
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=200601181418.35590.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--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
Powered by JetHome