Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp58810imm; Mon, 2 Jul 2018 07:39:08 -0700 (PDT) X-Google-Smtp-Source: ADUXVKITbiQ4KY10kZk36sHuTSo83OdznSEAB1Wmr+htwXLMZSVzojJHF/baBDkL3hf0A39g2A9P X-Received: by 2002:a65:560a:: with SMTP id l10-v6mr22384955pgs.130.1530542348234; Mon, 02 Jul 2018 07:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530542347; cv=none; d=google.com; s=arc-20160816; b=phRLuHYOmnPq1WMAuUodNVGvIFgGB+veZRUXEf4n9qwXe+01FdjVHzLyVqyfKLjt7A rznfJuJWQZXlJQLWmzUNJTkZ5ZmvH1+Btg1ayXPTt/NFZ6Dj3DFtbQ8JWUPFiXuH1CRr gq1aJYEpy7LlFviSDHObPtudYF86a++UNv+o99HcAyDHJSCa8yHcWygTL4N1ZM29PUo+ u4gSerI6Xr/gtdyhqUgB/JEtmhP9sIHTHe7eBerPgg7ws+2zrLeSzVx6Qkeh11QAxwnn y/Bmo5Lj0LYGav8TpNWSoMMvxSCrrVJMWp4TOtt2OCE/o9HuIpXzNRANZevLLO+ECHdU zdKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=fpEzOTF2F3/HeXdfyDhMbtiRjVOFiagoD2wnd8LuMyE=; b=fPhVxxveascmUE0YuykIBXgtLbHSoiriko+JcZlacT5fUFtT9x+4SLC+ttnrEi7Ucx XILW74/HiAWPHU6fc770cGTUS2edLrn5fqfwStwtX8raER0VKgvZFtzNMXY90vH4pajh Ky9o9RI79keLP+wfe9ZQ45DJCMY9tWCfHMF/Uv0MwtUzh+o/GH9aFjkMfyFOkVMWwfVp iIArBizWrd4GPKE/WtT4EwRpDqWXnwdaY6EAt66x1iFzZ1bbgH8andWqPsdsNiyi+tna iSFnTW7h/+PCxCLnFbYzYmlsau8DLdT/JgyrD90G5KN+0fj8zkJwlB39bPcP8pGeCv22 VDcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XQjA0nBp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si16248648plo.20.2018.07.02.07.38.52; Mon, 02 Jul 2018 07:39:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XQjA0nBp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752432AbeGBOhp (ORCPT + 99 others); Mon, 2 Jul 2018 10:37:45 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:38756 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752040AbeGBOhn (ORCPT ); Mon, 2 Jul 2018 10:37:43 -0400 Received: by mail-io0-f194.google.com with SMTP id v26-v6so2682859iog.5 for ; Mon, 02 Jul 2018 07:37:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=fpEzOTF2F3/HeXdfyDhMbtiRjVOFiagoD2wnd8LuMyE=; b=XQjA0nBpKFXClAP3lpHxuqwW1FctjeHvPUuQ4LVImjzrlYSKgqIM3E0iJCy2owqAFS OaR5ivq6tDHRmm1RSGzmEeNN3MAZV4vsYjjPcNsnDZXl4SjqPnsrHgy/J+9K9CvpxPFg ZezxV3zNw2AQbR8Z+3lv1O2CYT2z+1jt3Ai0I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=fpEzOTF2F3/HeXdfyDhMbtiRjVOFiagoD2wnd8LuMyE=; b=lWogL2/Lh+rOgZeSVq9LBtUHwz3mFemwxoaEEjQtEQvET05nGkGlYqNA0GYVfJBrAt vDkjIFJj8fvanFvkleVLIKNpmOkaK96gMwyeDwOT0A586TpI3LQYv4nfaVpphvv+pUTB JR1zw0ExVbN1fZN8rdoXnf16+J9ht/VgrOLL8UmlOOPwfoov1M1bzxK1u6+sU67taRq2 FA4JVfG+gberVHXdtRUWS+g95sJ6mA6aUBw3BeIi3C9KsRut6IPd8/DuJNKBmHY4toa/ jIxIQbA+gbB7BDSQEb1wz+k8RzsHS8ykXpUCCuzp3f27+6MMmRaD9TiFALVByHnDeEdN awAw== X-Gm-Message-State: APt69E3uCj6pQJq4jSY9C/DvcL6vh3reuSaXYeMy3qTesl6FZ2FaxPo3 BQI1SWqdQTh9Qe09+PdBqc6iOqbXFHBrUqxRBx0VqRTz X-Received: by 2002:a6b:e403:: with SMTP id u3-v6mr20588998iog.131.1530542263322; Mon, 02 Jul 2018 07:37:43 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:818f:0:0:0:0:0 with HTTP; Mon, 2 Jul 2018 07:37:42 -0700 (PDT) In-Reply-To: <1530280769-14114-1-git-send-email-kehuanlin@pinecone.net> References: <1530280769-14114-1-git-send-email-kehuanlin@pinecone.net> From: Ulf Hansson Date: Mon, 2 Jul 2018 16:37:42 +0200 Message-ID: Subject: Re: [PATCH] mmc: dw_mmc: fix errors to use card read/write threshold for HS400 mode To: "Huanlin.Ke" Cc: kehuanlin@pinecone.net, zhangbo_a , Jaehoon Chung , "open list:SYNOPSYS DESIGNWARE MMC/SD/SDIO DRIVER" , open list , Qing Xia Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29 June 2018 at 15:59, Huanlin.Ke wrote: > The card write threshold is applicable for HS400 mode only, so it should > return back except HS400 timing mode. > > The card read threshold is also required for HS400 mode as the host > controller incorrectly samples the data if the card clock stops within > a block transfer. > > Signed-off-by: Huanlin.Ke > Signed-off-by: zhangbo_a Thanks for your patch! I have just applied an earlier version of the patch, posted by Qing Xia from Hisilicon. https://patchwork.kernel.org/patch/10434913/ If it works for you as well, I can add your tested by tags for it. Also, can you perhaps point me to a commit which introduced the problem? Kind regards Uffe > --- > drivers/mmc/host/dw_mmc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c > index 623f4d2..d4e6983 100644 > --- a/drivers/mmc/host/dw_mmc.c > +++ b/drivers/mmc/host/dw_mmc.c > @@ -1065,7 +1065,7 @@ static void dw_mci_ctrl_thld(struct dw_mci *host, struct mmc_data *data) > * It's used when HS400 mode is enabled. > */ > if (data->flags & MMC_DATA_WRITE && > - !(host->timing != MMC_TIMING_MMC_HS400)) > + (host->timing != MMC_TIMING_MMC_HS400)) > return; > > if (data->flags & MMC_DATA_WRITE) > @@ -1074,6 +1074,7 @@ static void dw_mci_ctrl_thld(struct dw_mci *host, struct mmc_data *data) > enable = SDMMC_CARD_RD_THR_EN; > > if (host->timing != MMC_TIMING_MMC_HS200 && > + host->timing != MMC_TIMING_MMC_HS400 && > host->timing != MMC_TIMING_UHS_SDR104) > goto disable; > > -- > 2.7.4 >