From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Len Brown <lenb@kernel.org>
Cc: Alan Stern <stern@rowland.harvard.edu>, Greg KH <gregkh@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
Andrey Borzenkov <arvidjaar@mail.ru>,
LKML <linux-kernel@vger.kernel.org>,
USB list <linux-usb@vger.kernel.org>,
pm list <linux-pm@lists.linux-foundation.org>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Zdenek Kabelac <zdenek.kabelac@gmail.com>,
Ingo Molnar <mingo@elte.hu>,
Jeff Chua <jeff.chua.linux@gmail.com>
Subject: Re: [PATCH] USB: Fix suspend-resume of PCI USB controllers
Date: Tue, 20 Jan 2009 22:03:42 +0100 [thread overview]
Message-ID: <200901202203.44103.rjw@sisk.pl> (raw)
In-Reply-To: <alpine.LFD.2.00.0901201526510.5575@localhost.localdomain>
On Tuesday 20 January 2009, Len Brown wrote:
>
> > > Alan, does this look ok for you?
> >
> > There are a few things I don't like about it:
> >
> > In usb_hcd_pci_suspend, the failure path for
> > pci_set_power_state doesn't undo all the changes
> > that have already been made. In fact, the easiest
> > way to do the rest of the recovery probably is to
> > call usb_hcd_pci_resume directly.
> >
> > In the !has_pci_pm path we don't call pci_set_power_state.
> > This means controllers with legacy power management won't
> > get suspended. Maybe pci_set_power_state should be
> > called always, and has_pci_pm be used only for
> > interpreting the return code and printing debug messages.
> >
> > In usb_hcd_pci_resume, the pci_wake_from_d3 call
> > should be moved up right next to the pci_enable_wake
> > call. It makes no sense for them to be separated by
> > pci_enable_device and pci_set_master. After all,
> > even if you can't re-enable the device you probably
> > don't want it to continue being a wakeup source.
> >
> > It's a little annoying that several debug messages
> > in usb_hcd_pci_resume have been removed. Can't we
> > display the power state upon entry, before trying to
> > change it?
> >
> > It stands out that the resume method contains no call
> > to match pci_set_power_state() in the suspend method.
> > There should at least be a comment about it.
> >
> > Some of these problems predate Rafael's patch. Given that it has
> > already helped a number of people, we might want to merge the patch
> > and then make additional changes to address these issues.
>
> Rafael's patch is required for upstream to resume on my T61.
>
> Tested-by: Len Brown <len.brown@intel.com>
>
> Perhaps Greg can apply Rafael's patch now to fix upstream ASAP,
> while Alan prepares a 2nd patch to address his observations above?
I'd very much appreciate doing that. My intention was only to fix the urgent
issue at hand.
Thanks,
Rafael
next prev parent reply other threads:[~2009-01-20 21:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-20 0:26 [PATCH] USB: Fix suspend-resume of PCI USB controllers Rafael J. Wysocki
2009-01-20 1:36 ` Greg KH
2009-01-20 1:36 ` Greg KH
2009-01-20 15:54 ` Alan Stern
2009-01-20 20:33 ` Len Brown
2009-01-20 20:33 ` Len Brown
2009-01-20 21:03 ` Rafael J. Wysocki [this message]
2009-01-20 21:03 ` Rafael J. Wysocki
2009-01-20 15:54 ` Alan Stern
-- strict thread matches above, loose matches on Subject: below --
2009-01-20 0:26 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=200901202203.44103.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akpm@linux-foundation.org \
--cc=arvidjaar@mail.ru \
--cc=borntraeger@de.ibm.com \
--cc=gregkh@suse.de \
--cc=jeff.chua.linux@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=stern@rowland.harvard.edu \
--cc=zdenek.kabelac@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.