lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200912042215.03776.rjw@sisk.pl>
Date:	Fri, 4 Dec 2009 22:15:03 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Matthew Garrett <mjg59@...f.ucam.org>
Cc:	pm list <linux-pm@...ts.linux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Linux PCI <linux-pci@...r.kernel.org>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	Alan Stern <stern@...land.harvard.edu>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Oliver Neukum <oliver@...kum.org>,
	Shaohua Li <shaohua.li@...el.com>,
	Bjorn Helgaas <bjorn.helgaas@...com>,
	Francois Romieu <romieu@...zoreil.com>,
	Len Brown <lenb@...nel.org>
Subject: Re: [RFC][PATCH 10/12] PCI / ACPI PM: Platform support for PCI PME wake-up (rev. 4)

On Friday 04 December 2009, Matthew Garrett wrote:
> 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?

I  think we can simply do:

+        if (nb->pci_dev) {
+                pci_pme_wakeup(nb->pci_dev);
+                pm_request_resume(&nb->pci_dev->dev);
+        }

If the pci_pme_wakeup() spawns a resume request, the other call will just
return.

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ