From patchwork Sat Jun 25 21:29:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 918452 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5PLVnJ2013402 for ; Sat, 25 Jun 2011 21:31:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752431Ab1FYVbq (ORCPT ); Sat, 25 Jun 2011 17:31:46 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:58145 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752381Ab1FYVbo (ORCPT ); Sat, 25 Jun 2011 17:31:44 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id 11FE81B3A4D; Sat, 25 Jun 2011 23:10:04 +0200 (CEST) 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 24286-05; Sat, 25 Jun 2011 23:09:35 +0200 (CEST) Received: from ferrari.rjw.lan (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 493A81B3A55; Sat, 25 Jun 2011 23:09:04 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux PM mailing list Subject: [PATCH 7/10 v6] PM / Domains: Don't stop wakeup devices during system sleep transitions Date: Sat, 25 Jun 2011 23:29:24 +0200 User-Agent: KMail/1.13.6 (Linux/3.0.0-rc4+; KDE/4.6.0; x86_64; ; ) Cc: "Greg Kroah-Hartman" , Magnus Damm , Paul Walmsley , Kevin Hilman , Alan Stern , LKML , linux-sh@vger.kernel.org, Paul Mundt References: <201106112223.04972.rjw@sisk.pl> <201106252324.13454.rjw@sisk.pl> In-Reply-To: <201106252324.13454.rjw@sisk.pl> MIME-Version: 1.0 Message-Id: <201106252329.24342.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 25 Jun 2011 21:31:50 +0000 (UTC) From: Rafael J. Wysocki Devices that are set up to wake up the system from sleep states should not be stopped and power should not be removed from them when the system goes into a sleep state. Make the generic PM domain code respect that limitation. Signed-off-by: Rafael J. Wysocki --- drivers/base/power/domain.c | 6 ++++++ 1 file changed, 6 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" 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/base/power/domain.c =================================================================== --- linux-2.6.orig/drivers/base/power/domain.c +++ linux-2.6/drivers/base/power/domain.c @@ -445,6 +445,9 @@ static int pm_genpd_suspend_noirq(struct if (ret) return ret; + if (device_may_wakeup(dev)) + return 0; + if (genpd->stop_device) genpd->stop_device(dev); @@ -665,6 +668,9 @@ static int pm_genpd_dev_poweroff_noirq(s if (ret) return ret; + if (device_may_wakeup(dev)) + return 0; + if (genpd->stop_device) genpd->stop_device(dev);