Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763171AbZATVEm (ORCPT ); Tue, 20 Jan 2009 16:04:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762070AbZATVEY (ORCPT ); Tue, 20 Jan 2009 16:04:24 -0500 Received: from ogre.sisk.pl ([217.79.144.158]:47904 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761467AbZATVEW (ORCPT ); Tue, 20 Jan 2009 16:04:22 -0500 From: "Rafael J. Wysocki" To: Len Brown Subject: Re: [PATCH] USB: Fix suspend-resume of PCI USB controllers Date: Tue, 20 Jan 2009 22:03:42 +0100 User-Agent: KMail/1.10.3 (Linux/2.6.29-rc2-tst; KDE/4.1.3; x86_64; ; ) Cc: Alan Stern , Greg KH , Andrew Morton , Andrey Borzenkov , LKML , USB list , pm list , Christian Borntraeger , Zdenek Kabelac , Ingo Molnar , Jeff Chua References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901202203.44103.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2229 Lines: 55 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 > > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/