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: <20100104154038.76a9eedf@jbarnes-piketon>
Date:	Mon, 4 Jan 2010 15:40:38 -0800
From:	Jesse Barnes <jbarnes@...tuousgeek.org>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Matthew Garrett <mjg@...hat.com>, Len Brown <lenb@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	pm list <linux-pm@...ts.linux-foundation.org>,
	Alan Stern <stern@...land.harvard.edu>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	Linux PCI <linux-pci@...r.kernel.org>,
	Oliver Neukum <oliver@...kum.org>,
	Bjorn Helgaas <bjorn.helgaas@...com>,
	Shaohua Li <shaohua.li@...el.com>,
	Francois Romieu <romieu@...zoreil.com>
Subject: Re: [PATCH 2/12] PCI / PM: Propagate wake-up enable for PCIe
 devices too

On Sun, 27 Dec 2009 21:00:33 +0100
"Rafael J. Wysocki" <rjw@...k.pl> wrote:

> From: Rafael J. Wysocki <rjw@...k.pl>
> 
> Having read the PM part of the PCIe 2.0 specification more carefully
> I think that it was a mistake to restrict the wake-up enable
> propagation to non-PCIe devices, because if we do not request
> control of the root ports' PME registers via OSC, PCIe PME is
> supposed to be handled by the platform, just like the non-PCIe PME.
> Even if we do that, the wake-up propagation is done to allow the
> devices to wake up the system from sleep states which involves the
> platform anyway, so it won't hurt.
> 
> Signed-off-by: Rafael J. Wysocki <rjw@...k.pl>
> ---
>  drivers/pci/pci-acpi.c |   10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> Index: linux-2.6/drivers/pci/pci-acpi.c
> ===================================================================
> --- linux-2.6.orig/drivers/pci/pci-acpi.c
> +++ linux-2.6/drivers/pci/pci-acpi.c
> @@ -112,11 +112,7 @@ static bool acpi_pci_can_wakeup(struct p
>  static void acpi_pci_propagate_wakeup_enable(struct pci_bus *bus,
> bool enable) {
>  	while (bus->parent) {
> -		struct pci_dev *bridge = bus->self;
> -		int ret;
> -
> -		ret = acpi_pm_device_sleep_wake(&bridge->dev,
> enable);
> -		if (!ret || pci_is_pcie(bridge))
> +		if (!acpi_pm_device_sleep_wake(&bus->self->dev,
> enable)) return;
>  		bus = bus->parent;
>  	}
> @@ -131,9 +127,7 @@ static int acpi_pci_sleep_wake(struct pc
>  	if (acpi_pci_can_wakeup(dev))
>  		return acpi_pm_device_sleep_wake(&dev->dev, enable);
>  
> -	if (!pci_is_pcie(dev))
> -		acpi_pci_propagate_wakeup_enable(dev->bus, enable);
> -
> +	acpi_pci_propagate_wakeup_enable(dev->bus, enable);
>  	return 0;
>  }

Seems ok to try it out, but as usual with this sort of thing, the real
question is, "What does Windows do?", since wakeup enable ACPI support
for PCIe devices is likely broken unless Windows uses it.

-- 
Jesse Barnes, Intel Open Source Technology Center
--
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