public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <greg@kroah.com>,
	USB development list <linux-usb-devel@lists.sourceforge.net>,
	linux-kernel@vger.kernel.org
Subject: Re: PATCH (as112) Re: USB APM suspend
Date: Mon, 22 Sep 2003 09:04:57 -0700	[thread overview]
Message-ID: <3F6F1DA9.1090409@pacbell.net> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0309221034230.1884-100000@ida.rowland.org>

Alan Stern wrote:
> On Sun, 21 Sep 2003, David Brownell wrote:
> 
>>>Why was this routine called twice?  (Don't be fooled by the timestamps; I 
>>>think the "suspend D4 --> D3" message was created during the suspend but 
>>>not read by syslogd until after the resume.)
>>
>>That's happened for as long as I remember (2.4 also).
>>Still seems buglike to me, maybe 2.6 will finally squish it...
> 
> 
> Well, the code path is easy enough to find.  If you look at suspend() in
> arch/i386/kernel/apm.c, you'll see calls to pm_send_all() and
> device_suspend().  They both end up filtering down to the USB HC drivers.  
> The bad one is pm_send_all(); it comes too soon.

Rather, "it comes at all".  Call device_{suspend,resume} should
suffice.  It shouldn't pm_send_all() -- either of the two calls.
(The 2.4 bug is necessarily a different issue.)

Does it work if you remove those calls?


> By the way, David, apparently core/hcd-pci.c wants the HC drivers to set 
> the hcd state to USB_STATE_SUSPENDED, but a simple grep shows that neither 
> the EHCI nor the OHCI driver does so.  That certainly looks like an 
> oversight, though I'm not sure in which source file.

And what's odd is that it was working before, too!  I'll have a look,
next I get a chance.  It's good to know that APM is almost behaving again.


> Meanwhile, here's a simple patch to improve logging during suspend and
> resume.  Greg, if David approves please apply it.

Reads OK to me -- go for it!

- Dave





  reply	other threads:[~2003-09-22 15:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-19 22:14 USB APM suspend Alan Stern
2003-09-19 22:24 ` Greg KH
2003-09-22  0:58 ` David Brownell
2003-09-22 15:09   ` PATCH (as112) " Alan Stern
2003-09-22 16:04     ` David Brownell [this message]
2003-09-24  0:17     ` 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=3F6F1DA9.1090409@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