From: David Brownell <david-b@pacbell.net>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: USB rejecting sleep
Date: Sun, 18 Dec 2005 12:58:46 -0800 [thread overview]
Message-ID: <200512181258.47030.david-b@pacbell.net> (raw)
In-Reply-To: <1134937642.6102.85.camel@gaston>
On Sunday 18 December 2005 12:27 pm, Benjamin Herrenschmidt wrote:
> Hi David, Alan !
>
> What exactly changed in the recent USB stacks that is causing it to
> abort system suspend much more often ? I'm getting lots of user reports
> with 2.6.15-rc5 saying that they can't put their internal laptops to
> sleep, apparently because a driver doesn't have a suspend method
> (internal bluetooth in this case).
Which I hope _did_ generate a bug report to the maintainer of that
bluetooth code. :)
> It's never been mandatory so far for all drivers of all connected
> devices to have a suspend method... didn't we decide back then that
> disconneting those was the right way to go ?
Right, but the system never stopped self-deadlocking when we did the
disconnect at suspend time. My notes say "driver core suspend()
calls are made with dev->sem held, so usb_driver_release_interface()
always deadlocks when they try to claim the same lock" and presumably
that's still true.
I guess I didn't realize the consequence of not fixing that as part
of the other PM updates, once I found that the "most natural" fix
was (still?) not possible.
> Any reason we are rejecting the sleep process for these currently ? A
> locking issue that makes disconnecting not yet feasible ? What changed
> from the previous version where that worked ?
The current kernels tighten up the suspend processing and offloaded lots
of stuff to the driver core. Previous kernels didn't have code that
could care about such stuff, at least without USB_SUSPEND enabled.
So the issue is now how to handle this error case. I think it should
be possible to just mark the device as disconnected right as soon as
we notice it can't be suspended; resume processing will do the work,
it already does so for real disconnect. And disconnect paths in USB
drivers are now pretty solid.
- Dave
next prev parent reply other threads:[~2005-12-18 20:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-18 20:27 USB rejecting sleep Benjamin Herrenschmidt
2005-12-18 20:58 ` David Brownell [this message]
2005-12-18 21:01 ` Benjamin Herrenschmidt
2005-12-18 22:07 ` Marcel Holtmann
2005-12-18 23:11 ` Alan Stern
2005-12-18 21:50 ` Greg KH
2005-12-18 22:13 ` Benjamin Herrenschmidt
2005-12-18 22:25 ` Greg KH
2005-12-18 23:16 ` Benjamin Herrenschmidt
2005-12-19 2:51 ` Benjamin Herrenschmidt
2005-12-19 3:11 ` Alan Stern
2005-12-19 3:24 ` Benjamin Herrenschmidt
2005-12-19 14:45 ` Alan Stern
2005-12-22 16:02 ` Pavel Machek
2005-12-27 4:19 ` 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=200512181258.47030.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@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