From patchwork Sat Mar 28 21:26:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 14913 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2SLQOat008913 for ; Sat, 28 Mar 2009 21:26:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760696AbZC1V0Y (ORCPT ); Sat, 28 Mar 2009 17:26:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760698AbZC1V0Y (ORCPT ); Sat, 28 Mar 2009 17:26:24 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:59792 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760696AbZC1V0X (ORCPT ); Sat, 28 Mar 2009 17:26:23 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id 8FE391274AA; Sat, 28 Mar 2009 19:44:46 +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 02758-06; Sat, 28 Mar 2009 19:44:39 +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 E6607125315; Sat, 28 Mar 2009 19:44:39 +0100 (CET) From: "Rafael J. Wysocki" To: Jesse Barnes Subject: [PATCH] PCI PM: Make pci_prepare_to_sleep() disable wake-up if needed Date: Sat, 28 Mar 2009 22:26:15 +0100 User-Agent: KMail/1.11.1 (Linux/2.6.29-rjw; KDE/4.2.1; x86_64; ; ) Cc: LKML , Linux PCI , pm list MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200903282226.15511.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Rafael J. Wysocki If the device is not supposed to wake up the system, ie. when device_may_wakeup(&dev->dev) returns 'false', pci_prepare_to_sleep() should pass 'false' to pci_enable_wake() so that it calls the platform to disable the wake-up capability of the device. Signed-off-by: Rafael J. Wysocki --- drivers/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/drivers/pci/pci.c =================================================================== --- linux-2.6.orig/drivers/pci/pci.c +++ linux-2.6/drivers/pci/pci.c @@ -1268,7 +1268,7 @@ int pci_prepare_to_sleep(struct pci_dev if (target_state == PCI_POWER_ERROR) return -EIO; - pci_enable_wake(dev, target_state, true); + pci_enable_wake(dev, target_state, device_may_wakeup(&dev->dev)); error = pci_set_power_state(dev, target_state);