From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753408AbZIMWzc (ORCPT ); Sun, 13 Sep 2009 18:55:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753268AbZIMWza (ORCPT ); Sun, 13 Sep 2009 18:55:30 -0400 Received: from cavan.codon.org.uk ([93.93.128.6]:59659 "EHLO cavan.codon.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753028AbZIMWz3 (ORCPT ); Sun, 13 Sep 2009 18:55:29 -0400 Date: Sun, 13 Sep 2009 23:55:18 +0100 From: Matthew Garrett To: "Rafael J. Wysocki" Cc: pm list , Linux PCI , Len Brown , LKML , Jesse Barnes , Shaohua Li , ACPI Devel Maling List Subject: Re: [RFC][PATCH 3/4] PCI / ACPI PM: Platform support for PCI PME wake-up Message-ID: <20090913225518.GA31787@srcf.ucam.org> References: <200909132320.05077.rjw@sisk.pl> <200909132324.03340.rjw@sisk.pl> <20090913222505.GC31175@srcf.ucam.org> <200909140053.05779.rjw@sisk.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200909140053.05779.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 On Mon, Sep 14, 2009 at 12:53:05AM +0200, Rafael J. Wysocki wrote: > On Monday 14 September 2009, Matthew Garrett wrote: > > On Sun, Sep 13, 2009 at 11:24:03PM +0200, Rafael J. Wysocki wrote: > > > + } else if (!dev->wakeup.flags.run_wake) { > > > + acpi_set_gpe_type(dev->wakeup.gpe_device, > > > + dev->wakeup.gpe_number, > > > + ACPI_GPE_TYPE_WAKE); > > > > Is this going to work for cases where we have multiple devices attached > > to the same GPE? The common one is EHCI, where both EHCI HCDs will be > > one a single GPE. If we wake one, that'll then disable the GPE for the > > other. Further wakeup events will then be lost. > > You're right, I overlooked that. Some kind of refcounting is needed here. I've sent patches to implement this at the GPE level, which also change the API for requesting them. I'm waiting on feedback from Bob Moore. > > > + if (device->wakeup.flags.valid) > > > + acpi_install_notify_handler(device->handle, ACPI_SYSTEM_NOTIFY, > > > + pci_acpi_device_wakeup, > > > + &dev->dev); > > > + > > > > I think this will fail for the root bridge if acpiphp has already > > grabbed it to check for hotplug events. > > The root bridge is not a struct pci_dev and this is called only for these. Are you sure? When I did this I saw conflicts with acpiphp. I may have my terminology confused. I sent another patch that abstract that out. -- Matthew Garrett | mjg59@srcf.ucam.org