Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5722207imm; Mon, 27 Aug 2018 03:09:04 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZu886m1hSNuZLOlsFA7Qj7tabwfg1mE9ADzVPYx0S9isWOsMJkXAhQ5qQbHgydD7cdTxkA X-Received: by 2002:a62:2646:: with SMTP id m67-v6mr13718825pfm.254.1535364544415; Mon, 27 Aug 2018 03:09:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535364544; cv=none; d=google.com; s=arc-20160816; b=p6Afw6yM3xyC7/j2ooRUKjpaZjqcyeY2qMQ6HznFrBoebf4fq9UrsqvoeAR4K+DLAU zBVyGNa0ftNju8EWmW2RxGrtU4uz4oTf0bKakPoIfs0tUUGIR3vF9g3MLbe5z2ue9uO3 mzWSB2bAakFVlfZhxGqzFvHTGn//1eZ2BJlewNxNsxNegeBsmFbf/YW1CSEKxYSq04vv tCH8nzX6WH44nDnNQ7AU3zPzWOV48KhQispTseIVumrd9UzN8rhqYfxOjr8iEfZzU1LI xW+FLW5UGc5/UlGJaRqTTmvCMQm12TwOhFkt01z8y6g7WXbPCq4PwIDF5JiuQZ3CYIDg j2lw== 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=8oDe0d0GaWEjTdjOchuNbOKsGZ/SHxzb0secHWpFJsI=; b=SBn0ETQITOttWdtx4/zGZbO0A1NsJQKOhhPlFeT5vmmjYKKVqcSF6HaGXeQJBTDJjt 6jk2DGCpRsv2jsPpMcg5QRQlPmGgmlm1cS6szzeyKE8XuP3DfpwWSDqP3E3oeqqaSAmw I7VDpMYNdr841ZSMDhYuyEBAXYkc+BOhdZWl2jemWBjgELNSxxbeJZuZpFFmiHKqj6uR mDQUCOr1ka5aXK4UWtdrxkdDrtVahEcp58DkSWX04HrD7HPCJ36k2rS0Rmvgr7O0pTPq Sousfxwx5gDKeOcIaFPgUpzRE/dJyFNq4XTA6PNmFcOssJ3NFI9wsj4AVSKhF7EXlXw5 wdfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WRyqmkuq; 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 b28-v6si14278668pfe.265.2018.08.27.03.08.49; Mon, 27 Aug 2018 03:09:04 -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=WRyqmkuq; 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 S1727227AbeH0NxZ (ORCPT + 99 others); Mon, 27 Aug 2018 09:53:25 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:40033 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726873AbeH0NxZ (ORCPT ); Mon, 27 Aug 2018 09:53:25 -0400 Received: by mail-io0-f196.google.com with SMTP id l14-v6so12325803iob.7 for ; Mon, 27 Aug 2018 03:07:24 -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=8oDe0d0GaWEjTdjOchuNbOKsGZ/SHxzb0secHWpFJsI=; b=WRyqmkuqUi0Xfgenaf95PrZn0Qbwzh2g/xUFO0tM7psmHjSGKenIrhiSluC65V9scQ H7V5sNWbyl6GmAerUpQsTKEZTFdUJlViGYgrOEcRcwAKX9GkyxeQ8cBBtOLyEl0r38b8 qkBPApjq/rdMR3wDui52hcXA7K0xfVtTuVm48= 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=8oDe0d0GaWEjTdjOchuNbOKsGZ/SHxzb0secHWpFJsI=; b=ukJzH4kING9WTDMJBrdnKXX7StkBcxrQXYqnt2nMF8JpbpRJpMSGeiOeomaVyo4nDy 3YooJXJXpNw9+2AMjmUNQht91Bq7ZQ1qRJYCLPT5Y2dZnnLwccVKSNj5auuI3RFlhNbR yYgT1KZmQP9zlZvBMweVwf+CNFDTx8dcDysNo82gKqpwk76SCNeKwZos+pteXLRPU711 LgRHxzlwXSGoowuBLdQ+XWSoz2eM88VzFTVHGBUzgZ6pADn6xFr4u6uALKjBxb5nKrkK qACMomGybRNyvc8tEWEPsGeO91WdYZo7bJfMv1Kj/cf6h8P6O7ywlo1Kl12B0EjIjXlj siNw== X-Gm-Message-State: APzg51CyHW6nJkrhQ+pSf2PDNl+p09DrtfZrSAXTmj1aUas5fctzL3hJ iVRNJNpKWuttSUlkGBZhJtNdAYVNBhXRLfYmHjvU2Q== X-Received: by 2002:a6b:c995:: with SMTP id z143-v6mr9835010iof.266.1535364444255; Mon, 27 Aug 2018 03:07:24 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:2b03:0:0:0:0:0 with HTTP; Mon, 27 Aug 2018 03:07:23 -0700 (PDT) In-Reply-To: <9de08b30-cb92-01c6-caf3-c4abc3591dcf@intel.com> References: <1534406064-10065-1-git-send-email-zhang.chunyan@linaro.org> <1534406064-10065-7-git-send-email-zhang.chunyan@linaro.org> <9de08b30-cb92-01c6-caf3-c4abc3591dcf@intel.com> From: Ulf Hansson Date: Mon, 27 Aug 2018 12:07:23 +0200 Message-ID: Subject: Re: [PATCH V5 06/10] mmc: sdhci: Disable auto-CMD23 if stuff bits is set in CMD23 argument To: Chunyan Zhang , Adrian Hunter Cc: "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List , Orson Zhai , Baolin Wang , Billows Wu , Jason Wu , Chunyan Zhang 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 23 August 2018 at 14:50, Adrian Hunter wrote: > On 16/08/18 10:54, Chunyan Zhang wrote: >> For version 4.10 and aboves, SDHCI_ARGUMENT2 is also uses to indicate >> 32-bit number of blocks, it doesn't support stuff bits in argument of >> CMD23, but only block count for the following command (CMD18/25). >> >> Signed-off-by: Chunyan Zhang >> --- >> drivers/mmc/host/sdhci.c | 9 +++++++++ >> drivers/mmc/host/sdhci.h | 1 + >> 2 files changed, 10 insertions(+) >> >> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c >> index b3328ee..a72ad0d 100644 >> --- a/drivers/mmc/host/sdhci.c >> +++ b/drivers/mmc/host/sdhci.c >> @@ -1729,6 +1729,15 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) >> } >> } >> >> + /* >> + * For version 4.10 and above, ARGUMENT2 register is also used as 32-bit >> + * block count register which don't support stuff bits of CMD23 argument >> + */ >> + if (host->version >= SDHCI_SPEC_410 && >> + mrq->sbc && (mrq->sbc->arg & SDHCI_ARG2_STUFF) && >> + (host->flags & SDHCI_AUTO_CMD23)) >> + host->flags &= ~SDHCI_AUTO_CMD23; > > I would prefer this be done in sdhci-sprd.c by hooking ->request(). Someone > sent a patch recently to export sdhci_request(). Right. So I have picked up the patch you were referring to. https://lkml.org/lkml/2018/8/20/140 Chunyan, you may now preferably base your next version on top of my mmc tree's next branch. [...] Kind regards Uffe