Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5774177imm; Mon, 27 Aug 2018 04:10:09 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda8zXzBwrFEzbDha3y4pAiXk9ZCxwH7HEwatsCVh7wwnhGSTQgrkbIGFIIaOL6oPS4O6rQ2 X-Received: by 2002:a17:902:5481:: with SMTP id e1-v6mr12834212pli.309.1535368209160; Mon, 27 Aug 2018 04:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535368209; cv=none; d=google.com; s=arc-20160816; b=QYnILnkRoRIPpkyK6EdNWQJuCYAtcLkZmkbx3nZ0Qz9deaj/4Zra1I6KsGVfGshJEu 8YU47SYZ4RKv/jetGelKFwKh/CPqa78SeS/z96OBVu1zmOsa4Hdl8s1mfSQ8JimNEcWh RgZnyTSkMFDBjQaaTfEHFkVV066LawW9fTUEXX0heKy6zn4TmXgKGyyGe32ccTLtcoW4 XmOrGlqstuKxOaAmTMlb2/IdSBY/njErMBJSt/QHu6G9uiX/DiqjSgAlHkzbRJpD+y2Y gJEHHYb/V8u27b7ihFcOqmL3jEwbtiYb/bdyq6+soNDZeXaQvLBnYAoyJdXk6WxUvoLd 6etQ== 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=FHFK6UdD8PFVH46XAqZPV4zSvfmBpRasFTc1Ym4AHt4=; b=eVk508PDzj6HkTXf7yPQr07unpitjoGqeoAshiy1/Q1Y3A9iKFDrynDVpAzd8dMXso BUHx9VB/Jw4NsqgtbAIt99L+uGF6yvoTQbqYuSUkcRRIykqpHzwuLMu5bKvkShPxV9hf htWoeunbvpPhlwYeAFK93I6E6aA/kzqdfjab6jo85fCBGQ8RbH5o06KRP0pghzqSchow O2r5DbQ9RelEm0okGkJwcL2+kskGmAx3qo6021ypIr83B5EeVhZ2HlY7dxyGPpLXWNuh aLcka7PnrcRbL5qhEYIhxRTZDi7pXIBdwpSYOoE3yyAtE4gVbK0clWCTDYlwwKyZCqVm sP/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y8roXGXe; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2-v6si14258928pgl.40.2018.08.27.04.09.53; Mon, 27 Aug 2018 04:10:09 -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=@gmail.com header.s=20161025 header.b=Y8roXGXe; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727212AbeH0OyM (ORCPT + 99 others); Mon, 27 Aug 2018 10:54:12 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:40832 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726785AbeH0OyM (ORCPT ); Mon, 27 Aug 2018 10:54:12 -0400 Received: by mail-lj1-f196.google.com with SMTP id j19-v6so11988859ljc.7; Mon, 27 Aug 2018 04:07:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=FHFK6UdD8PFVH46XAqZPV4zSvfmBpRasFTc1Ym4AHt4=; b=Y8roXGXeRZvQyDnnAxjnLODK29H8+fAXVmdqK7mE2LsvXys39AFW20fVaQQbq1knky YPEQj4EJ4EPsQk6ocnwYV5NrDkV3OzY5h3bArcwa8mUSLqXutzVCurGdhmEqCzxHL0f4 CxXF1ZR0pet9jdBaXSWOOl4TOJfo522wgdIzMAk9NcFmekI0yWG8rDt7JsO2pp5rdClt oT98R3gUBgWto7LAQ7qZmyrtEnpRmxmGTb9r/O0TJpU2b7MEn7YmrWIEESxAtSZ8ipkd DHCwA7tFOMRHTuI3Mu50+jySKo6b9tULzZ4fEiFk0p397fPJXHI/8043c6ORI9F3RmWA Wteg== 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=FHFK6UdD8PFVH46XAqZPV4zSvfmBpRasFTc1Ym4AHt4=; b=hT04Pc/wZ/3JDYBByhTnbU4Ab+Tp/ySRRg3by39Srm7QqAkVopkWGFK4j1gj7B5rNW 3N1RuCEdEMfjsyqlvAlLJ3Xd1VSVfwpLIV3ie6u2dkZOXHI2dHpW4g09Cv6l91dGQFd3 7SDa2J5Nrol/8HmVJDWhRlDmo+cv1gaVxtstq1HRRC0YRYyYUEajGjXtgq2KKWb9+pir zTS1pV7zBW+vbW4ph/m9t0WlA8qHRSO2V2Tk5Sy5/Zdi3fzxNQfjf6kr0uFDb3ksXujr Xgm2AroVcFZfjy5DV71O5IbLRlYGLByFA4sKf8NP8j4nRrRvlL1duAZ/JM37Tv4oQ7Oq QsuA== X-Gm-Message-State: APzg51CTf8RKQwS73fXIEPTOmBIvqRzjyqPgvHbEmPs6k9VdSHcW2VWf YldYd+VyKK9ZrPgd/Klj/D//Wl7aArYT/m6e+wA= X-Received: by 2002:a2e:9c0f:: with SMTP id s15-v6mr8741334lji.97.1535368078332; Mon, 27 Aug 2018 04:07:58 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab3:6318:0:0:0:0:0 with HTTP; Mon, 27 Aug 2018 04:07:18 -0700 (PDT) In-Reply-To: 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: Chunyan Zhang Date: Mon, 27 Aug 2018 19:07:18 +0800 Message-ID: Subject: Re: [PATCH V5 06/10] mmc: sdhci: Disable auto-CMD23 if stuff bits is set in CMD23 argument To: Ulf Hansson Cc: Chunyan Zhang , Adrian Hunter , "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List , Orson Zhai , Baolin Wang , Billows Wu , Jason Wu 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 27 August 2018 at 18:07, Ulf Hansson wrote: > 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. Ok, will do. Thanks, Chunyan > > [...] > > Kind regards > Uffe