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: 9642305 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 97A7B602C9 for ; Fri, 24 Mar 2017 06:19:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87FA827F81 for ; Fri, 24 Mar 2017 06:19:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 798AF2841C; Fri, 24 Mar 2017 06:19:58 +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.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 6598527F81 for ; Fri, 24 Mar 2017 06:19:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934204AbdCXGTy (ORCPT ); Fri, 24 Mar 2017 02:19:54 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:42839 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1755501AbdCXGTl (ORCPT ); Fri, 24 Mar 2017 02:19:41 -0400 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 CC: Matthias Brugger , Adrian Hunter , Jaehoon Chung , Chaotian Jing , Shawn Lin , Masahiro Yamada , , , , , 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 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.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;