From patchwork Wed Apr 20 18:41:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Parsons X-Patchwork-Id: 722741 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3KIopb3003057 for ; Wed, 20 Apr 2011 18:50:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752551Ab1DTSuu (ORCPT ); Wed, 20 Apr 2011 14:50:50 -0400 Received: from relay.pcl-ipout02.plus.net ([212.159.7.100]:19233 "EHLO relay.pcl-ipout02.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752485Ab1DTSuu (ORCPT ); Wed, 20 Apr 2011 14:50:50 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 20 Apr 2011 18:50:51 +0000 (UTC) X-Greylist: delayed 583 seconds by postgrey-1.27 at vger.kernel.org; Wed, 20 Apr 2011 14:50:50 EDT X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApQiAOInr01UXeb6/2dsb2JhbACCNYJeki4xjUt3tzQCh0aJFQ6FYwSSIYJSgRQ Received: from outmx05.plus.net ([84.93.230.250]) by relay.pcl-ipout02.plus.net with ESMTP; 20 Apr 2011 19:41:05 +0100 Received: from [87.114.194.130] (helo=paul) by outmx05.plus.net with esmtp (Exim) id 1QCcKn-0002iC-AM; Wed, 20 Apr 2011 19:41:05 +0100 Subject: [PATCH] mmc: tmio: Fix tmio MMC_POWER_UP From: "Paul Parsons" To: Cc: Date: Wed, 20 Apr 2011 18:41:04 +0000 Mime-Version: 1.0 X-Mailer: email v2.5.0 (Linux 2.6.38 x86_64 [http://email.cleancode.org]) Message-Id: Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Fix tmio MMC_POWER_UP invocation which had been broken in linux-2.6.39-rc1. In tmio_mmc_set_ios() an affirmative test for ios->clock == 0 executes the MMC_POWER_OFF block regardless of ios->power_mode. Because mmc_power_up() invokes MMC_POWER_UP before setting ios->clock, tmio_mmc_set_ios() turns the MMC power off instead of on. Signed-off-by: Paul Parsons --- -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- clean-2.6.39-rc4/drivers/mmc/host/tmio_mmc_pio.c 2011-04-20 19:13:27.144322768 +0100 +++ linux-2.6.39-rc4/drivers/mmc/host/tmio_mmc_pio.c 2011-04-20 19:11:49.135616453 +0100 @@ -728,7 +728,7 @@ static void tmio_mmc_set_ios(struct mmc_ tmio_mmc_set_clock(host, ios->clock); /* Power sequence - OFF -> UP -> ON */ - if (ios->power_mode == MMC_POWER_OFF || !ios->clock) { + if (ios->power_mode == MMC_POWER_OFF) { /* power down SD bus */ if (ios->power_mode == MMC_POWER_OFF && host->set_pwr) host->set_pwr(host->pdev, 0);