public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: David Brownell <david-b@pacbell.net>
Cc: Mattia Dongili <malattia@linux.it>,
	Jiri Slaby <jirislaby@gmail.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org,
	linux-usb-devel@lists.sourceforge.net, linux-pm@osdl.org,
	pavel@suse.cz
Subject: Re: [PATCH] get USB suspend to work again on 2.6.17-mm1
Date: Thu, 22 Jun 2006 21:24:52 -0700	[thread overview]
Message-ID: <20060623042452.GA23232@kroah.com> (raw)
In-Reply-To: <200606222034.44085.david-b@pacbell.net>

On Thu, Jun 22, 2006 at 08:34:43PM -0700, David Brownell wrote:
> On Thursday 22 June 2006 4:51 pm, Greg KH wrote:
> > > There was previously an invariant that the interfaces were marked
> > > as quiescent unless the interface (a) had a driver, and (b) that
> > > driver was not suspended.  Evidently that has been lost.  This patch
> > > may be insufficient; ISTR other places relying on that invariant.
> > > 
> > > And yes, we _should_ care about whether or not any interface is
> > > still active, until the pm core code starts to pay attention to
> > > the driver model tree at all times ... even outside of system-wide
> > > suspend transitions.  Today, the pm core code doesn't even use
> > > that tree directly, and all runtime state changes (like selective
> > > suspend with USB) completely bypass that pm tree.
> > 
> > Hm, ok, yes, we should care about interfaces, but we need some way to
> > only walk them, not anything else that might be attached to us...
> 
> Under what scenario could it possibly be legitimate to suspend a
> usb device -- or interface, or anything else -- with its children
> remaining active?  The ability to guarantee that could _never_ happen
> was one of the fundamental motivations for the driver model ...

I'm not disagreeing with that.  It's just that you are looping all
struct devices that are attached to a struct usb_device and assuming
that they are all of type struct usb_interface.  And that's not true
anymore, and should never have been assumed (which is probably my fault
way long ago when converting USB to the driver model.)

We probably need to keep our own list of interfaces if we want to
properly walk them now...

And we also need to be able to handle devices in the device tree that do
not have a suspend/resume function, or ones that are not attached to any
bus, without failing the suspend, as obviously they do not care or need
to worry about the whole issue.

thanks,

greg k-h

  reply	other threads:[~2006-06-23  4:27 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-22 20:29 [PATCH] get USB suspend to work again on 2.6.17-mm1 Greg KH
2006-06-22 21:27 ` Jiri Slaby
2006-06-22 21:28 ` Mattia Dongili
2006-06-22 21:34 ` Mattia Dongili
2006-06-22 23:24 ` David Brownell
2006-06-22 23:51   ` Greg KH
2006-06-23  2:45     ` Alan Stern
2006-06-23  4:26       ` Greg KH
2006-06-23 14:28         ` Alan Stern
2006-06-23  3:34     ` David Brownell
2006-06-23  4:24       ` Greg KH [this message]
2006-06-23 14:51         ` Alan Stern
2006-06-23 15:38           ` [linux-usb-devel] " David Brownell
2006-06-26 23:57           ` Greg KH
2006-06-27  2:04             ` David Brownell
2006-06-27 15:24               ` Alan Stern
2006-06-27 23:28                 ` Greg KH
2006-06-27 23:26               ` Greg KH
2006-06-27  9:03             ` Pavel Machek
2006-06-27 17:38               ` David Brownell
2006-06-27 23:20                 ` Greg KH
2006-06-25  2:42       ` [linux-pm] " Jim Gettys
2006-06-25  4:32         ` David Brownell

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=20060623042452.GA23232@kroah.com \
    --to=greg@kroah.com \
    --cc=akpm@osdl.org \
    --cc=david-b@pacbell.net \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@osdl.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=malattia@linux.it \
    --cc=pavel@suse.cz \
    --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