From patchwork Tue Jan 10 07:00:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 9506535 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6AD02606E1 for ; Tue, 10 Jan 2017 07:02:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6464E2833F for ; Tue, 10 Jan 2017 07:02:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5951328462; Tue, 10 Jan 2017 07:02:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39C5628364 for ; Tue, 10 Jan 2017 07:02:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933716AbdAJHCE (ORCPT ); Tue, 10 Jan 2017 02:02:04 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:48370 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933603AbdAJHCC (ORCPT ); Tue, 10 Jan 2017 02:02:02 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id F10BB6145A; Tue, 10 Jan 2017 07:01:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1484031716; bh=zckYKUjzNxF6HcbQO39QLNv60W0FHaGi252/x/GtTAw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GJJsth54/CsLciPeNvCYwvoa5CSZOrt7dLq/ShUGviq7T+4TGVPhJBxnOScD86HCE leQudwNLgnTx11gc79IjM6Lu2eKc8mCa1LIrUa8XD6qc1eN3Ww5RsV1qx0RZx2EhBT 1UEGG9lIq6twbtQBrkquNQ0KsHUjG2RepLfq7vsk= Received: from rharjani-linux.qualcomm.com (unknown [202.46.23.54]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: riteshh@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7ECD1614DC; Tue, 10 Jan 2017 07:01:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1484031714; bh=zckYKUjzNxF6HcbQO39QLNv60W0FHaGi252/x/GtTAw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Flv5amashC+Txsh+zNm6pI+MBKoVNv4vkE+4umyixgBbV+0NJqU1LduqikrjAg8i7 GPjhX+Lz61WxDItSo6QZFVvcdzgYQPGwXhEXSisTN6a4/QnuOsLbSmbDqFgLPRnK5W yYD+7B2dDTX72T2E/wpRYK1+bwOoXAspKbYsMUwI= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 7ECD1614DC Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=riteshh@codeaurora.org From: Ritesh Harjani To: adrian.hunter@intel.com, ulf.hansson@linaro.org Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, shawn.lin@rock-chips.com, linux-arm-msm@vger.kernel.org, georgi.djakov@linaro.org, asutoshd@codeaurora.org, stummala@codeaurora.org, venkatg@codeaurora.org, pramod.gurav@linaro.org, jeremymc@redhat.com, git@kchr.de, Ritesh Harjani Subject: [RESEND PATCHv1 6/8] mmc: sdhci: Clear SDHCI_HS400_TUNING flag after platform_execute_tuning Date: Tue, 10 Jan 2017 12:30:50 +0530 Message-Id: <1484031652-12059-7-git-send-email-riteshh@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1484031652-12059-1-git-send-email-riteshh@codeaurora.org> References: <1484031652-12059-1-git-send-email-riteshh@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Clear SDHCI_HS400_TUNING flag after platform_execute_tuning so that platform_execute_tuning may use it if needed. Signed-off-by: Ritesh Harjani --- drivers/mmc/host/sdhci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 2390980..2658f89 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2114,7 +2114,6 @@ int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) spin_lock_irqsave(&host->lock, flags); hs400_tuning = host->flags & SDHCI_HS400_TUNING; - host->flags &= ~SDHCI_HS400_TUNING; if (host->tuning_mode == SDHCI_TUNING_MODE_1) tuning_count = host->tuning_count; @@ -2156,7 +2155,9 @@ int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) if (host->ops->platform_execute_tuning) { spin_unlock_irqrestore(&host->lock, flags); - return host->ops->platform_execute_tuning(host, opcode); + err = host->ops->platform_execute_tuning(host, opcode); + spin_lock_irqsave(&host->lock, flags); + goto out_unlock; } host->mmc->retune_period = tuning_count; @@ -2167,6 +2168,7 @@ int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) sdhci_end_tuning(host); out_unlock: + host->flags &= ~SDHCI_HS400_TUNING; spin_unlock_irqrestore(&host->lock, flags); return err;