Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751340Ab0BHVMk (ORCPT ); Mon, 8 Feb 2010 16:12:40 -0500 Received: from e36.co.us.ibm.com ([32.97.110.154]:50307 "EHLO e36.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750810Ab0BHVMi (ORCPT ); Mon, 8 Feb 2010 16:12:38 -0500 Date: Mon, 8 Feb 2010 13:12:25 -0800 From: Gary Hade To: "Rafael J. Wysocki" Cc: Gary Hade , Bjorn Helgaas , Jesse Barnes , "Moore, Robert" , Matthew Garrett , Len Brown , LKML , pm list , Linux PCI , Alan Stern , Oliver Neukum , Shaohua Li Subject: Re: [PATCH 8/9] PCI / ACPI / PM: Platform support for PCI PME wake-up (rev. 7) Message-ID: <20100208211225.GA10429@us.ibm.com> References: <201001101431.38630.rjw@sisk.pl> <201002062111.56512.rjw@sisk.pl> <20100208175333.GA9334@us.ibm.com> <201002082017.14631.rjw@sisk.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201002082017.14631.rjw@sisk.pl> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6069 Lines: 127 On Mon, Feb 08, 2010 at 08:17:14PM +0100, Rafael J. Wysocki wrote: > On Monday 08 February 2010, Gary Hade wrote: > > On Sat, Feb 06, 2010 at 09:11:56PM +0100, Rafael J. Wysocki wrote: > > > On Saturday 06 February 2010, Bjorn Helgaas wrote: > > > > On Sunday 10 January 2010 07:01:03 am Rafael J. Wysocki wrote: > > > > > From: Rafael J. Wysocki > > > > > > > > > > Although the majority of PCI devices can generate PMEs that in > > > > > principle may be used to wake up devices suspended at run time, > > > > > platform support is generally necessary to convert PMEs into wake-up > > > > > events that can be delivered to the kernel. If ACPI is used for this > > > > > purpose, a PME generated by a PCI device will trigger the ACPI GPE > > > > > associated with the device to generate an ACPI wake-up event that we > > > > > can set up a handler for, provided that everything is configured > > > > > correctly. > > > > > > > > I think acpiphp needs a little attention after this patch. Gary > > > > Hade noticed while testing Jesse's linux-next branch that acpiphp > > > > complains like this: > > > > > > > > acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 > > > > acpiphp: Slot [9] registered > > > > acpiphp: Slot [10] registered > > > > acpiphp_glue: failed to register interrupt notify handler > > > > acpiphp: Slot [6] registered > > > > acpiphp_glue: failed to register interrupt notify handler > > > > > > > > I reproduced this on an HP rx3600 (ia64), and found that acpiphp > > > > doesn't complain on commit 82533a617f453, but it *does* complain > > > > on commit fb3383bb4ac6e, which seems to be this patch. > > > > > > I can't see the possible reason looking at the code alone. > > > > > > Could you add a debug printk() printing the error code returned by > > > pci_acpi_add_hp_notifier() in acpiphp_glue.c:register_slot(), please? > > > > Rafael, On the system where I ran into the problem it returns > > AE_NOT_FOUND. See below. > > Thanks! > > Well, that means there's no struct acpi_device object associated with handle. Yes, I also added code to pci_acpi_add_hp_notifier() that confirms the -ENODEV return from acpi_bus_get_device() for non-populated slots. I thought it was kind of curious that Bjorn's message seemed to indicate that acpiphp actually loaded on his system when it did not load on mine. It turns out that the load failure on my system was apparently due to all of the hotpluggable slots being non-populated. After booting with a card present in slot 3, register_slot() got some AE_OK returns from pci_acpi_add_hp_notifier() _and_ the acpiphp load succeeded. See below. > > I must admit I didn't take that into consideration, but it should be easily > fixable. I'll send a patch for that later today. Thanks. I'll give it a test drive when I see it. Gary -- Gary Hade System x Enablement IBM Linux Technology Center 503-578-4503 IBM T/L: 775-4503 garyhade@us.ibm.com http://www.ibm.com/linux/ltc [ 120.320794] pci_hotplug: PCI Hot Plug PCI Core version: 0.5 [ 120.341939] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 [ 120.341960] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=0 [ 120.342027] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=0 [ 120.342043] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=0 [ 120.342073] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=0 [ 120.342105] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=0 [ 120.342151] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=0 [ 120.342191] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=0 [ 120.342232] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=0 [ 120.342440] acpiphp: Slot [1] registered [ 120.342445] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=-19 [ 120.342448] register_slot: status=0x5 [ 120.342450] acpiphp_glue: failed to register interrupt notify handler [ 120.342576] acpiphp: Slot [2] registered [ 120.342580] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=-19 [ 120.342582] register_slot: status=0x5 [ 120.342584] acpiphp_glue: failed to register interrupt notify handler [ 120.342744] acpiphp: Slot [3] registered [ 120.342748] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=0 [ 120.342751] register_slot: status=0x0 [ 120.342886] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=0 [ 120.342889] register_slot: status=0x0 [ 120.342966] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=0 [ 120.342973] register_slot: status=0x0 [ 120.343049] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=0 [ 120.343054] register_slot: status=0x0 [ 120.343128] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=0 [ 120.343133] register_slot: status=0x0 [ 120.343209] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=0 [ 120.343215] register_slot: status=0x0 [ 120.343290] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=0 [ 120.343295] register_slot: status=0x0 [ 120.343368] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=0 [ 120.343374] register_slot: status=0x0 [ 120.343378] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=0 [ 120.343381] init_bridge_misc: status=0x0 [ 120.343640] acpiphp: Slot [4] registered [ 120.343645] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=-19 [ 120.343647] register_slot: status=0x5 [ 120.343649] acpiphp_glue: failed to register interrupt notify handler [ 120.343881] acpiphp: Slot [5] registered [ 120.343885] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=-19 [ 120.343887] register_slot: status=0x5 [ 120.343889] acpiphp_glue: failed to register interrupt notify handler [ 120.344225] acpiphp: Slot [6] registered [ 120.344234] pci_acpi_add_hp_notifier: acpi_bus_get_device_ret=-19 [ 120.344242] register_slot: status=0x5 [ 120.344249] acpiphp_glue: failed to register interrupt notify handler -- 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/