Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932174AbZLDQVf (ORCPT ); Fri, 4 Dec 2009 11:21:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932127AbZLDQVe (ORCPT ); Fri, 4 Dec 2009 11:21:34 -0500 Received: from cavan.codon.org.uk ([93.93.128.6]:58166 "EHLO cavan.codon.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932119AbZLDQVd (ORCPT ); Fri, 4 Dec 2009 11:21:33 -0500 Date: Fri, 4 Dec 2009 16:21:07 +0000 From: Matthew Garrett To: "Rafael J. Wysocki" Cc: pm list , LKML , Linux PCI , ACPI Devel Maling List , Alan Stern , Jesse Barnes , Oliver Neukum , Shaohua Li , Bjorn Helgaas , Francois Romieu , Len Brown Subject: Re: [RFC][PATCH 10/12] PCI / ACPI PM: Platform support for PCI PME wake-up (rev. 4) Message-ID: <20091204162107.GA13371@srcf.ucam.org> References: <200911160047.46299.rjw@sisk.pl> <200911291632.44763.rjw@sisk.pl> <200911291642.20172.rjw@sisk.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200911291642.20172.rjw@sisk.pl> User-Agent: Mutt/1.5.18 (2008-05-17) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: mjg59@cavan.codon.org.uk X-SA-Exim-Scanned: No (on cavan.codon.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1166 Lines: 29 On Sun, Nov 29, 2009 at 04:42:20PM +0100, Rafael J. Wysocki wrote: > + if (event == ACPI_NOTIFY_DEVICE_WAKE) { > + if (nb->dev->wakeup.run_wake_count > 0) { > + if (nb->pci_bus) > + pci_pme_wakeup_bus(nb->pci_bus); > + if (nb->pci_dev) > + pci_pme_wakeup(nb->pci_dev); We may receive wakeup events on devices that aren't PME capable, which is the case for uhci on my test box. In that case we probably want to wake them up unconditionally. + if (nb->pci_dev) { + if (nb->pci_dev->pm_cap) + pci_pme_wakeup(nb->pci_dev); + else + pm_request_resume(&nb->pci_dev->dev); seems to work, though possibly we should assume that the firmware knows best and always schedule a wake in respose to a resume request? -- Matthew Garrett | mjg59@srcf.ucam.org -- 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/