From patchwork Sun Jul 17 15:38:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Drake X-Patchwork-Id: 984252 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6HGI7pM004314 for ; Sun, 17 Jul 2011 16:18:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755985Ab1GQQSH (ORCPT ); Sun, 17 Jul 2011 12:18:07 -0400 Received: from queueout02-winn.ispmail.ntl.com ([81.103.221.56]:45847 "EHLO queueout02-winn.ispmail.ntl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755971Ab1GQQSH (ORCPT ); Sun, 17 Jul 2011 12:18:07 -0400 Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20110717153844.ZCKO10265.mtaout01-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com>; Sun, 17 Jul 2011 16:38:44 +0100 Received: from zog.reactivated.net ([86.14.215.141]) by aamtaout04-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20110717153844.VJRI25656.aamtaout04-winn.ispmail.ntl.com@zog.reactivated.net>; Sun, 17 Jul 2011 16:38:44 +0100 Received: by zog.reactivated.net (Postfix, from userid 1000) id D4BF29D401C; Sun, 17 Jul 2011 16:38:41 +0100 (BST) From: Daniel Drake To: cjb@laptop.org Cc: linux-mmc@vger.kernel.org Cc: ohad@wizery.com Subject: [PATCH] mmc: print debug messages for runtime PM actions Message-Id: <20110717153841.D4BF29D401C@zog.reactivated.net> Date: Sun, 17 Jul 2011 16:38:41 +0100 (BST) X-Cloudmark-Analysis: v=1.1 cv=R50lirqlHffDPPkwUlkuVa99MrvKdVWo//yz83qex8g= c=1 sm=0 a=n8fxn4xeLAgA:10 a=vJ1w_8FsMGIA:10 a=Vt2AcnKqAAAA:8 a=VwQbUJbxAAAA:8 a=Op-mwl0xAAAA:8 a=yY2Nw2uhlSey0pmALUkA:9 a=W3rELiGsHbqkzJ-_ra8A:7 a=d4CUUju0HPYA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 17 Jul 2011 16:18:08 +0000 (UTC) At http://www.mail-archive.com/linux-mmc@vger.kernel.org/msg08371.html we found and fixed a bug where mmc's runtime power management functions were not being called. We have now also made improvements to the SDIO powerup routine which could possibly mask this kind of issue in future. Add debug messages to the runtime PM hooks so that it is easy to verify if and when runtime PM is happening. Signed-off-by: Daniel Drake --- drivers/mmc/core/core.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) For linux-3.1. diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 0a04886..ad0c55a 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1664,6 +1664,10 @@ int mmc_power_save_host(struct mmc_host *host) { int ret = 0; +#ifdef CONFIG_MMC_DEBUG + pr_info("%s: %s: powering down\n", mmc_hostname(host), __func__); +#endif + mmc_bus_get(host); if (!host->bus_ops || host->bus_dead || !host->bus_ops->power_restore) { @@ -1686,6 +1690,10 @@ int mmc_power_restore_host(struct mmc_host *host) { int ret; +#ifdef CONFIG_MMC_DEBUG + pr_info("%s: %s: powering up\n", mmc_hostname(host), __func__); +#endif + mmc_bus_get(host); if (!host->bus_ops || host->bus_dead || !host->bus_ops->power_restore) {