From patchwork Sun Dec 27 20:00:33 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 69849 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBRKCtOQ028243 for ; Sun, 27 Dec 2009 20:12:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751231AbZL0ULl (ORCPT ); Sun, 27 Dec 2009 15:11:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751141AbZL0ULh (ORCPT ); Sun, 27 Dec 2009 15:11:37 -0500 Received: from ogre.sisk.pl ([217.79.144.158]:60424 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbZL0ULf (ORCPT ); Sun, 27 Dec 2009 15:11:35 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id 6AEFD167991; Sun, 27 Dec 2009 21:08:57 +0100 (CET) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27219-09; Sun, 27 Dec 2009 21:08:40 +0100 (CET) Received: from tosh.localnet (220-bem-13.acn.waw.pl [82.210.184.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id 528E416452F; Sun, 27 Dec 2009 21:08:40 +0100 (CET) From: "Rafael J. Wysocki" To: Jesse Barnes Subject: [PATCH 2/12] PCI / PM: Propagate wake-up enable for PCIe devices too Date: Sun, 27 Dec 2009 21:00:33 +0100 User-Agent: KMail/1.12.3 (Linux/2.6.33-rc2-tst; KDE/4.3.3; x86_64; ; ) Cc: Matthew Garrett , Len Brown , LKML , pm list , Alan Stern , ACPI Devel Maling List , Linux PCI , Oliver Neukum , Bjorn Helgaas , Shaohua Li , Francois Romieu References: <200912272057.10443.rjw@sisk.pl> In-Reply-To: <200912272057.10443.rjw@sisk.pl> MIME-Version: 1.0 Message-Id: <200912272100.33117.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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; }