From patchwork Sun Feb 13 05:39:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Rakity X-Patchwork-Id: 552601 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 p1D5dRBe027859 for ; Sun, 13 Feb 2011 05:39:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751025Ab1BMFjZ (ORCPT ); Sun, 13 Feb 2011 00:39:25 -0500 Received: from na3sys009aog108.obsmtp.com ([74.125.149.199]:42791 "EHLO na3sys009aog108.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750816Ab1BMFjY convert rfc822-to-8bit (ORCPT ); Sun, 13 Feb 2011 00:39:24 -0500 Received: from source ([65.219.4.129]) (using TLSv1) by na3sys009aob108.postini.com ([74.125.148.12]) with SMTP ID DSNKTVduiqXuB29Nj0Svw+P7XYwIZQ4DS9+i@postini.com; Sat, 12 Feb 2011 21:39:24 PST Received: from SC-vEXCH3.marvell.com ([10.93.76.133]) by SC-OWA01.marvell.com ([10.93.76.21]) with mapi; Sat, 12 Feb 2011 21:39:21 -0800 From: Philip Rakity To: Pierre Tardy CC: "linux-mmc@vger.kernel.org" Date: Sat, 12 Feb 2011 21:39:20 -0800 Subject: [RFC} sdhci.c set_ios -- disable global interrupts and Question on Power Management Thread-Topic: [RFC} sdhci.c set_ios -- disable global interrupts and Question on Power Management Thread-Index: AcvLQF01EltesWaSRdyb4FzF7RGM1w== Message-ID: <7953F5A4-7BFA-4E40-8202-C682C0314F49@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 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 (demeter1.kernel.org [140.211.167.41]); Sun, 13 Feb 2011 05:39:28 +0000 (UTC) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 655617c..1a88303 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1161,13 +1161,13 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) { struct sdhci_host *host; - unsigned long flags; unsigned int lastclock; u8 ctrl; host = mmc_priv(mmc); - spin_lock_irqsave(&host->lock, flags); + disable_irq(host->irq); + spin_lock(&host->lock); if (host->flags & SDHCI_DEVICE_DEAD) goto out; @@ -1180,14 +1180,14 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) lastclock = host->iosclock; host->iosclock = ios->clock; if (lastclock == 0 && ios->clock != 0) { - spin_unlock_irqrestore(&host->lock, flags); + spin_unlock(&host->lock); pm_runtime_get_sync(host->mmc->parent); - spin_lock_irqsave(&host->lock, flags); + spin_lock(&host->lock); } else if (lastclock != 0 && ios->clock == 0) { - spin_unlock_irqrestore(&host->lock, flags); + spin_unlock(&host->lock); pm_runtime_mark_last_busy(host->mmc->parent); pm_runtime_put_autosuspend(host->mmc->parent); - spin_lock_irqsave(&host->lock, flags); + spin_lock(&host->lock); } /* no need to configure the rest.. */ if (host->iosclock == 0) @@ -1257,7 +1257,8 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) out: mmiowb(); - spin_unlock_irqrestore(&host->lock, flags); + spin_unlock(&host->lock); + enable_irq(host->irq); } static int sdhci_get_ro(struct mmc_host *mmc)