From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjorn Helgaas Subject: Re: [PATCH] PCI / ACPI: Always resume devices on ACPI wakeup notifications Date: Thu, 28 Mar 2013 10:21:30 -0600 Message-ID: References: <2282655.IicBMMa6jN@vostro.rjw.lan> <2289048.zbdFnrKsCA@vostro.rjw.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from mail-ob0-f182.google.com ([209.85.214.182]:49481 "EHLO mail-ob0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756089Ab3C1QVv (ORCPT ); Thu, 28 Mar 2013 12:21:51 -0400 Received: by mail-ob0-f182.google.com with SMTP id ef5so6807314obb.13 for ; Thu, 28 Mar 2013 09:21:50 -0700 (PDT) In-Reply-To: <2289048.zbdFnrKsCA@vostro.rjw.lan> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: "Rafael J. Wysocki" Cc: ACPI Devel Maling List , Len Brown , Matthew Garrett , Sarah Sharp On Thu, Mar 28, 2013 at 6:57 AM, Rafael J. Wysocki wrote: > Hi Bjorn, > > I wonder what you think about the patch below? Seems fine to me (I'm trusting your and Matthew's judgment here since I don't know much about it). Why don't you resend it with Matthew's ack and the appropriate stable tags, and I'll put it in. If you have a URL for a bugzilla or mailing list report of the original problem, that would be good, too. It'd be nice if users and distros could match problem reports with this solution, but I can't tell what the user-visible issue was. I assume that Sarah tested this (or somebody else reproduced the problem and tested the fix)? > On Saturday, March 23, 2013 03:33:03 PM Rafael J. Wysocki wrote: >> From: Rafael J. Wysocki >> >> It turns out that _Lxx control methods provided by some BIOSes clear >> the PME Status bit of PCI devices they handle, which means that >> pci_acpi_wake_dev() cannot really use that bit to check whether or >> not the device has signalled wakeup. >> >> For this reason, make pci_acpi_wake_dev() always attempt to resume >> the device it is called for regardless of the device's PME Status bit >> value (that bit still has to be cleared if set at this point, >> though). >> >> Reported-by: Sarah Sharp >> Signed-off-by: Rafael J. Wysocki >> --- >> drivers/pci/pci-acpi.c | 15 ++++++++------- >> 1 file changed, 8 insertions(+), 7 deletions(-) >> >> Index: linux-pm/drivers/pci/pci-acpi.c >> =================================================================== >> --- linux-pm.orig/drivers/pci/pci-acpi.c >> +++ linux-pm/drivers/pci/pci-acpi.c >> @@ -53,14 +53,15 @@ static void pci_acpi_wake_dev(acpi_handl >> return; >> } >> >> - if (!pci_dev->pm_cap || !pci_dev->pme_support >> - || pci_check_pme_status(pci_dev)) { >> - if (pci_dev->pme_poll) >> - pci_dev->pme_poll = false; >> + /* Clear PME Status if set. */ >> + if (pci_dev->pme_support) >> + pci_check_pme_status(pci_dev); >> >> - pci_wakeup_event(pci_dev); >> - pm_runtime_resume(&pci_dev->dev); >> - } >> + if (pci_dev->pme_poll) >> + pci_dev->pme_poll = false; >> + >> + pci_wakeup_event(pci_dev); >> + pm_runtime_resume(&pci_dev->dev); >> >> if (pci_dev->subordinate) >> pci_pme_wakeup_bus(pci_dev->subordinate); >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > -- > I speak only for myself. > Rafael J. Wysocki, Intel Open Source Technology Center.