From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D0CFC4332F for ; Thu, 17 Nov 2022 07:16:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232521AbiKQHQK (ORCPT ); Thu, 17 Nov 2022 02:16:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233963AbiKQHQI (ORCPT ); Thu, 17 Nov 2022 02:16:08 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B2816F35A; Wed, 16 Nov 2022 23:16:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668669366; x=1700205366; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=OZR+MyWLgP8HkrZB6F3ZwjvvPglgkpwXgGMdnYgokHc=; b=eHl9Ds18wekUjKrR2j+IFgYswVUB3iXAAhx6iTSBnNsave5wPW2vmh3G D/BoeGbRv2WGHmP7fXo4c63BCY8h3s13IEFYx6MwQkk3cJS6Dl77jAc7T as6SBo36j6dYXLRC9S4rA4ISf1FeBVefP41i20YdEb+SFA357LJGlKV6h 47YYOmLjO2KHebmMilHuTCwX7cCvxbT7wIZKU2Uw9YMfPZGSG96alk2MQ zfubzgoJtcby2zohNeSoY8pJPbogjP1J2oOFVLUC1UNitaMo5ER7VgYip 4H8zPktztPXmefUTHOblgxOFc+OvOLmjzn30JP8EXicqE2guopgvOlAk4 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10533"; a="311483256" X-IronPort-AV: E=Sophos;i="5.96,171,1665471600"; d="scan'208";a="311483256" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2022 23:16:05 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10533"; a="590511493" X-IronPort-AV: E=Sophos;i="5.96,171,1665471600"; d="scan'208";a="590511493" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO [10.0.2.15]) ([10.252.35.99]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2022 23:16:02 -0800 Message-ID: Date: Thu, 17 Nov 2022 09:15:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.5.0 Subject: Re: [PATCH V3 1/1] mmc: sdhci: Fix the SD tuning issue that the SDHCI_TRANSFER_MODE is cleared incorrectly Content-Language: en-US To: Charl Liu , ulf.hansson@linaro.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: shaper.liu@bayhubtech.com, chevron.li@bayhubtech.com, thomas.hu@bayhubtech.com, xiaoguang.yu@bayhubtech.com, shirley.her@bayhubtech.com References: <20221111122314.307-1-charl.liu@bayhubtech.com> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki In-Reply-To: <20221111122314.307-1-charl.liu@bayhubtech.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/11/22 14:23, Charl Liu wrote: > When cmd->opcode == MMC_SEND_TUNING_BLOCK, the SDHCI_TRANSFER_MODE > should also be kept > > Signed-off-by: Charl Liu Acked-by: Adrian Hunter > --- > change in V1: > Keeping the SDHCI_TRANSFER_MODE when cmd->opcode == MMC_END_TUNING_BLOCK > > change in V2: > add the mmc_op_tuning interface to judge if the opcode is tuning CMD > > change in V3: > cancel the redundant code > --- > drivers/mmc/host/sdhci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c > index fef03de85b99..98ee688de50d 100644 > --- a/drivers/mmc/host/sdhci.c > +++ b/drivers/mmc/host/sdhci.c > @@ -1465,7 +1465,7 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host, > if (host->quirks2 & > SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD) { > /* must not clear SDHCI_TRANSFER_MODE when tuning */ > - if (cmd->opcode != MMC_SEND_TUNING_BLOCK_HS200) > + if (!mmc_op_tuning(cmd->opcode)) > sdhci_writew(host, 0x0, SDHCI_TRANSFER_MODE); > } else { > /* clear Auto CMD settings for no data CMDs */