From patchwork Sun Jul 17 15:39:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Drake X-Patchwork-Id: 984272 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 p6HGI7pN004314 for ; Sun, 17 Jul 2011 16:18:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755971Ab1GQQSJ (ORCPT ); Sun, 17 Jul 2011 12:18:09 -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 S1753796Ab1GQQSJ (ORCPT ); Sun, 17 Jul 2011 12:18:09 -0400 Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20110717153920.DVXZ5301.mtaout03-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com>; Sun, 17 Jul 2011 16:39:20 +0100 Received: from zog.reactivated.net ([86.14.215.141]) by aamtaout03-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20110717153920.KCIV24017.aamtaout03-winn.ispmail.ntl.com@zog.reactivated.net>; Sun, 17 Jul 2011 16:39:20 +0100 Received: by zog.reactivated.net (Postfix, from userid 1000) id A8FB49D401C; Sun, 17 Jul 2011 16:39:14 +0100 (BST) From: Daniel Drake To: cjb@laptop.org Cc: linux-mmc@vger.kernel.org Cc: ohad@wizery.com Subject: [PATCH] mmc: enable runtime PM by default Message-Id: <20110717153914.A8FB49D401C@zog.reactivated.net> Date: Sun, 17 Jul 2011 16:39:14 +0100 (BST) X-Cloudmark-Analysis: v=1.1 cv=R50lirqlHffDPPkwUlkuVa99MrvKdVWo//yz83qex8g= c=1 sm=0 a=k5XEtpHDtsAA:10 a=vJ1w_8FsMGIA:10 a=Op-mwl0xAAAA:8 a=ODsFKYjBXPsqWYBrL-kA:9 a=ZjkkW-oDZ86bpJWOCToA: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:11 +0000 (UTC) Now that we have improved the runtime power management powerup/powerdown code, we believe that MMC_CAP_POWER_OFF_CARD is no longer necessary: runtime PM should now work everywhere. Enable this trivially for a release or two. If no problems are reported, we will follow up with a more extensive patch to remove this flag altogether. If problems are reported, we can look at whitelist/blacklist possibilities as before. Signed-off-by: Daniel Drake Acked-by: Ohad Ben-Cohen --- drivers/mmc/core/host.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) For linux-3.2. Might cause some breakage, so it should see a full linux-next cycle first. diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index b29d3e8..63bddd0 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -301,6 +301,17 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev) host->max_blk_size = 512; host->max_blk_count = PAGE_CACHE_SIZE / 512; + /* + * Enable runtime power management by default. This flag was added due + * to runtime power management causing disruption for some users, but + * the power on/off code has been improved since then. + * + * We'll enable this flag by default as an experiment, and if no + * problems are reported, we will follow up later and remove the flag + * altogether. + */ + host->caps = MMC_CAP_POWER_OFF_CARD; + return host; free: