From patchwork Fri Mar 24 06:19:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaotian Jing X-Patchwork-Id: 9642307 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 A3798602C9 for ; Fri, 24 Mar 2017 06:20:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94A1227F81 for ; Fri, 24 Mar 2017 06:20:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 88BFD28464; Fri, 24 Mar 2017 06:20:25 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4033727F81 for ; Fri, 24 Mar 2017 06:20:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QD/fEn33Iws9Cg+z1g3a8SFx5V00cPxkMI3fmGYhQBw=; b=GqN8cmuiMCQJ3S 44qOFnzAjZOtjuv+XGgTawUtuyMVagMyZ/i7gNFK4sThJWgb+nF6xNDrocuFILZxxw5SOFC4VMMf/ xVbWpjFC48yfj70XsP09ie8g7ohzT00JrJ9vM0NnmH8gLJ5f4459hBuxMQL/PGaliQlUR0Y4HuNp5 Jehoka0Cp9vJREHU6/rK+XGgFgxCcLPeiXtu6IrtbiQDsSdtqez7j2UclDy3LYPXWUlTrT35qv66J GtkrvHqNWCnmQbws0gSMTmf0gGFhUv6qeCPlxnbwy1cp5td7+C97scIWbwK1Rdnhxs7C5b/n/ySlq tyddlvIzsV+mt64ML+fQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1crIa7-0007hK-9b; Fri, 24 Mar 2017 06:20:15 +0000 Received: from [210.61.82.183] (helo=mailgw01.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1crIZp-0005u4-DC; Fri, 24 Mar 2017 06:19:59 +0000 Received: from mtkhts09.mediatek.inc [(172.21.101.70)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 2018276877; Fri, 24 Mar 2017 14:19:32 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkhts09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.266.1; Fri, 24 Mar 2017 14:19:30 +0800 From: Chaotian Jing To: Ulf Hansson Subject: [PATCH] mmc: core: Do not hold re-tuning during CMD6 commands Date: Fri, 24 Mar 2017 14:19:00 +0800 Message-ID: <1490336341-22292-2-git-send-email-chaotian.jing@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1490336341-22292-1-git-send-email-chaotian.jing@mediatek.com> References: <1490336341-22292-1-git-send-email-chaotian.jing@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170323_231958_101152_F14E39DE X-CRM114-Status: UNSURE ( 9.07 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: srv_heupstream@mediatek.com, Shawn Lin , linux-mmc@vger.kernel.org, Adrian Hunter , linux-kernel@vger.kernel.org, Jaehoon Chung , Masahiro Yamada , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Matthias Brugger , Chaotian Jing Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP this patch is refine for 'commit c6dbab9cb58f ("mmc: core: Hold re-tuning during switch commands")' Since it has 3 retries at max for CMD6, if the first CMD6 got CRC error, then should do re-tune before the next CMD6 was sent. Signed-off-by: Chaotian Jing --- drivers/mmc/core/mmc_ops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c index fe80f26..6931927 100644 --- a/drivers/mmc/core/mmc_ops.c +++ b/drivers/mmc/core/mmc_ops.c @@ -534,8 +534,6 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value, bool use_r1b_resp = use_busy_signal; unsigned char old_timing = host->ios.timing; - mmc_retune_hold(host); - /* * If the cmd timeout and the max_busy_timeout of the host are both * specified, let's validate them. A failure means we need to prevent @@ -567,6 +565,7 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value, cmd.sanitize_busy = true; err = mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES); + mmc_retune_hold(host); if (err) goto out;