public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	Matthew Garrett <mjg59@srcf.ucam.org>
Subject: Re: PME via interrupt or SCI mechanism?
Date: Thu, 29 Sep 2011 21:39:56 +0200	[thread overview]
Message-ID: <201109292139.56626.rjw@sisk.pl> (raw)
In-Reply-To: <20110929182327.GA4979@xanatos>

On Thursday, September 29, 2011, Sarah Sharp wrote:
> On Thu, Sep 29, 2011 at 12:21:28AM +0200, Rafael J. Wysocki wrote:
> > On Wednesday, September 28, 2011, Sarah Sharp wrote:
> > > On Tue, Sep 27, 2011 at 10:54:47PM +0200, Rafael J. Wysocki wrote:
> > > > On Tuesday, September 27, 2011, Sarah Sharp wrote:
> > > So it looks like gpe 0xD is enabled when the host goes into D3, and
> > > acpi_dev_run_wake is calling acpi_enable_gpe() with GPE 13 (i.e. 0xD),
> > > correct?
> > 
> > Yes, that's correct.
> > 
> > Moreover, evidently, the event is signaled and it causes pci_acpi_wake_dev()
> > to be called for multiple devices, _except_ for the xhci_hcd.  Perhaps
> > the notifier is not installed for that device for some reason.
> > 
> > Please add an additional debug printk()s to pci_acpi_add_pm_notifier()
> > for both pci_dev and dev and for the result returned by add_pm_notifier().
> 
> dmesg reports success from pci_acpi_add_pm_notifier for all PCI devices,
> including the xHCI host (PCI device 0000:00:14.0):
> 
> [    0.936882] pci_bus 0000:00: bus scan returning with max=04
> [    0.936884] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
> [    0.936961] pci 0000:00:1f.0: pci_acpi_add_pm_notifier
> [    0.936964] acpi device:02: pci_acpi_add_pm_notifier add_pm_notifier returned 0 (success)
> [    0.936977] pci 0000:00:19.0: pci_acpi_add_pm_notifier
> [    0.936978] acpi device:1f: pci_acpi_add_pm_notifier add_pm_notifier returned 0 (success)
> [    0.936981] pci 0000:00:1d.0: pci_acpi_add_pm_notifier
> [    0.936983] acpi device:20: pci_acpi_add_pm_notifier add_pm_notifier returned 0 (success)
> [    0.936986] pci 0000:00:1a.0: pci_acpi_add_pm_notifier
> [    0.936987] acpi device:2b: pci_acpi_add_pm_notifier add_pm_notifier returned 0 (success)
> [    0.936990] pci 0000:00:14.0: pci_acpi_add_pm_notifier
> [    0.936992] acpi device:34: pci_acpi_add_pm_notifier add_pm_notifier returned 0 (success)
> [    0.936995] pci 0000:00:1b.0: pci_acpi_add_pm_notifier
> [    0.936996] acpi device:3e: pci_acpi_add_pm_notifier add_pm_notifier returned 0 (success)
> [    0.936999] pci 0000:00:1c.0: pci_acpi_add_pm_notifier
> [    0.937001] acpi device:3f: pci_acpi_add_pm_notifier add_pm_notifier returned 0 (success)
> [    0.937002] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP01._PRT]
> [    0.937033] pci 0000:00:1c.7: pci_acpi_add_pm_notifier
> [    0.937035] acpi device:4d: pci_acpi_add_pm_notifier add_pm_notifier returned 0 (success)
> [    0.937036] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP08._PRT]
> [    0.937056] pci 0000:03:00.0: pci_acpi_add_pm_notifier
> [    0.937057] acpi device:4e: pci_acpi_add_pm_notifier add_pm_notifier returned 0 (success)
> [    0.937060] pci 0000:00:1f.2: pci_acpi_add_pm_notifier
> [    0.937062] acpi device:4f: pci_acpi_add_pm_notifier add_pm_notifier returned 0 (success)
> [    0.937066] pci 0000:00:1f.3: pci_acpi_add_pm_notifier
> [    0.937068] acpi device:52: pci_acpi_add_pm_notifier add_pm_notifier returned 0 (success)
> [    0.937071] pci 0000:00:01.0: pci_acpi_add_pm_notifier
> [    0.937072] acpi device:53: pci_acpi_add_pm_notifier add_pm_notifier returned 0 (success)
> [    0.937074] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PEG0._PRT]
> [    0.937094] pci 0000:01:00.0: pci_acpi_add_pm_notifier
> [    0.937095] acpi device:54: pci_acpi_add_pm_notifier add_pm_notifier returned 0 (success)
> [    0.937104] acpi_pci_osc_support
> 
> This morning, I debugged an issue with the NEC xHCI host controller
> issue in Keith Packard's Lenovo x220 machine.  The NEC host was not
> giving port status changes when the host controller was suspended, and
> it turns out Keith has a boot script that runs `echo auto > power/control`
> for all his PCI devices.  When he disabled that script and rebooted, his
> NEC host started working again.
> 
> So it's possible that other xHCI host controllers are also affected by
> this D3 wakeup issue, which makes it less likely to be a hardware bug,
> and more likely to be a PCI/ACPI/xHCI driver bug.

I'd recommend not to draw conclusions too early in this case.  It very
well may be a BIOS bug copy-pasted to may implementations or something
like this.

Please try the appended patch and check if you see the "Notification error
for GPE" message (please keep your previous debug patches applied).

Thanks,
Rafael

---
 drivers/acpi/acpica/evgpe.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Index: linux/drivers/acpi/acpica/evgpe.c
===================================================================
--- linux.orig/drivers/acpi/acpica/evgpe.c
+++ linux/drivers/acpi/acpica/evgpe.c
@@ -523,10 +523,14 @@ static void ACPI_SYSTEM_XFACE acpi_ev_as
 				ACPI_NOTIFY_DEVICE_WAKE);
 
 		notify_object = local_gpe_event_info->dispatch.device.next;
-		while (ACPI_SUCCESS(status) && notify_object) {
+		while (notify_object) {
 			status = acpi_ev_queue_notify_request(
 					notify_object->node,
 					ACPI_NOTIFY_DEVICE_WAKE);
+			if (ACPI_FAILURE(status))
+				ACPI_ERROR((AE_INFO,
+					"Notification error for GPE 0x%X",
+					local_gpe_event_info->gpe_number));
 			notify_object = notify_object->next;
 		}
 

  reply	other threads:[~2011-09-29 19:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-12 17:10 PME via interrupt or SCI mechanism? Sarah Sharp
2011-09-19 21:43 ` Rafael J. Wysocki
     [not found]   ` <20110922183201.GA4659@xanatos>
2011-09-25 14:53     ` Rafael J. Wysocki
2011-09-26 22:20       ` Rafael J. Wysocki
2011-09-26 23:48         ` Sarah Sharp
2011-09-27 11:21           ` Luming Yu
2011-09-27 20:32             ` Rafael J. Wysocki
2011-09-28  3:10               ` Luming Yu
2011-09-27 20:54           ` Rafael J. Wysocki
2011-09-27 23:52             ` Sarah Sharp
2011-09-28 22:21               ` Rafael J. Wysocki
2011-09-29  1:40                 ` Matthew Garrett
2011-09-29  9:05                   ` Rafael J. Wysocki
2011-09-29 18:23                 ` Sarah Sharp
2011-09-29 19:39                   ` Rafael J. Wysocki [this message]
2011-09-29 20:44                     ` Sarah Sharp
2011-09-29 21:28                       ` Rafael J. Wysocki
2011-09-29 21:38                         ` Rafael J. Wysocki
2011-09-29 21:51                           ` Rafael J. Wysocki
     [not found]                             ` <20110929225700.GA6207@xanatos>
2011-09-30 16:40                               ` Rafael J. Wysocki
2011-09-30 20:21                                 ` Rafael J. Wysocki
2011-10-01  0:30                                   ` Sarah Sharp
2011-10-01 20:29                                     ` 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=201109292139.56626.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=sarah.a.sharp@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox