From: Greg KH <greg@kroah.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-pm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: swsusp regression [Was: 2.6.17-mm1]
Date: Thu, 22 Jun 2006 13:22:57 -0700 [thread overview]
Message-ID: <20060622202257.GB13736@kroah.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0606221505030.5772-100000@iolanthe.rowland.org>
On Thu, Jun 22, 2006 at 03:57:24PM -0400, Alan Stern wrote:
> On Thu, 22 Jun 2006, Greg KH wrote:
>
> > > There are several possible ways to fix this. One is to add suspend and
> > > resume routines to the endpoint-device driver. Another is to change the
> > > code that checks for the children being suspended, to make it check only
> > > for child USB devices and not child endpoints.
> >
> > I think it needs to check for _USB_ devices, not just any old device
> > that could possibly be attached to the main USB device (as this one is.)
> > What's to stop any other struct device to bind here and cause the same
> > problem?
>
> In my upcoming patches for USB core suspend improvements, one of the
> changes affects this very piece of code. Instead of looping over all
> child devices in the driver-model sense, it loops over all interfaces in
> the active configuration, which is all we care about right here.
>
> > Ok, the problem is in verify_suspended(), we are not detecting what type
> > of device this is.
> >
> > Alan, what are you trying to check for here? What "bogus requests" were
> > you seeing from sysfs that you are trying to filter out?
>
> I didn't write that routine, Dave Brownell did. It has been there for
> ages.
Sorry for the misattribution, I should have checked closer.
> The "bogus requests" are attempts by the user to suspend a USB
> device (by writing to /sys/devices/.../power/state) without first
> suspending all its children and interfaces.
>
> (This can't happen when doing a global suspend because the PM core
> iterates through the entire device tree. It matters only for "runtime" or
> "selective" suspend.)
Then why is people hitting this now? I guess no one had hooked a struct
device to a struct usb_device before, only interfaces.
> The two easiest ways to fix the problem are:
>
> Change the code to look through the interfaces in the active
> configuration instead of using device_for_each_child;
Or at least verify that they are looking at an interface, just blindly
poking at a child device isn't very nice :(
> or
>
> Revert your "endpoints are devices" patch until my upcoming
> changes are in place.
I'll work on a fix-up patch based on the first option :)
thanks,
greg k-h
next prev parent reply other threads:[~2006-06-22 20:22 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060621034857.35cfe36f.akpm@osdl.org>
2006-06-21 21:48 ` swsusp regression [Was: 2.6.17-mm1] Jiri Slaby
2006-06-21 22:14 ` Mattia Dongili
2006-06-21 22:18 ` Mattia Dongili
2006-06-22 6:19 ` Greg KH
2006-06-22 7:46 ` [linux-pm] " Andrew Morton
2006-06-22 8:25 ` Jeremy Fitzhardinge
2006-06-22 15:51 ` Alan Stern
2006-06-22 17:17 ` Jeremy Fitzhardinge
2006-06-22 18:46 ` Greg KH
2006-06-22 19:07 ` [linux-pm] " Greg KH
2006-06-22 19:57 ` Alan Stern
2006-06-22 20:22 ` Greg KH [this message]
2006-06-22 20:38 ` Jiri Slaby
2006-06-22 21:09 ` Alan Stern
2006-06-22 21:11 ` Greg KH
2006-06-22 16:04 ` [linux-pm] " Frederik Deweerdt
2006-06-22 16:25 ` Andrew Morton
2006-06-22 19:07 ` [linux-pm] " Frederik Deweerdt
2006-06-23 9:02 ` Frederik Deweerdt
2006-06-23 9:10 ` [linux-pm] " Pavel Machek
2006-06-23 9:31 ` Andrew Morton
2006-06-23 12:12 ` Frederik Deweerdt
2006-06-23 12:57 ` Pavel Machek
2006-06-23 13:47 ` Frederik Deweerdt
2006-06-23 19:57 ` Andrew Morton
2006-06-26 9:00 ` [linux-pm] " Frederik Deweerdt
2006-06-23 19:41 ` Russell King
2006-06-23 20:22 ` Dave Jones
2006-06-23 21:10 ` Rafael J. Wysocki
2006-06-23 22:11 ` Pavel Machek
2006-06-23 23:53 ` [linux-pm] " Frederik Deweerdt
2006-06-24 17:16 ` Rafael J. Wysocki
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=20060622202257.GB13736@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@osdl.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