Linux-mmc Archive on lore.kernel.org
 help / color / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sasha Levin <sashal@kernel.org>,
	stable@vger.kernel.org
Cc: linux-mmc@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org>,
	Sowjanya Komatineni <skomatineni@nvidia.com>,
	Faiz Abbas <faiz_abbas@ti.com>,
	Anders Roxell <anders.roxell@linaro.org>,
	Naresh Kamboju <naresh.kamboju@linaro.org>,
	Bitan Biswas <bbiswas@nvidia.com>,
	Peter Geis <pgwipeout@gmail.com>
Subject: [PATCH 5.5.12 5/5] mmc: sdhci-tegra: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY
Date: Tue, 24 Mar 2020 19:06:50 +0100
Message-ID: <20200324180650.28819-6-ulf.hansson@linaro.org> (raw)
In-Reply-To: <20200324180650.28819-1-ulf.hansson@linaro.org>

[ Upstream commit d2f8bfa4bff5028bc40ed56b4497c32e05b0178f ]

It has turned out that the sdhci-tegra controller requires the R1B response,
for commands that has this response associated with them. So, converting
from an R1B to an R1 response for a CMD6 for example, leads to problems
with the HW busy detection support.

Fix this by informing the mmc core about the requirement, via setting the
host cap, MMC_CAP_NEED_RSP_BUSY.

Reported-by: Bitan Biswas <bbiswas@nvidia.com>
Reported-by: Peter Geis <pgwipeout@gmail.com>
Suggested-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Cc: <stable@vger.kernel.org>
Tested-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Tested-By: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/sdhci-tegra.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 403ac44a7378..a25c3a4d3f6c 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -1552,6 +1552,9 @@ static int sdhci_tegra_probe(struct platform_device *pdev)
 	if (tegra_host->soc_data->nvquirks & NVQUIRK_ENABLE_DDR50)
 		host->mmc->caps |= MMC_CAP_1_8V_DDR;
 
+	/* R1B responses is required to properly manage HW busy detection. */
+	host->mmc->caps |= MMC_CAP_NEED_RSP_BUSY;
+
 	tegra_sdhci_parse_dt(host);
 
 	tegra_host->power_gpio = devm_gpiod_get_optional(&pdev->dev, "power",
-- 
2.20.1


  parent reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 18:06 [PATCH 5.5.12 0/5] mmc: Fix some busy detect problems Ulf Hansson
2020-03-24 18:06 ` [PATCH 5.5.12 1/5] mmc: core: Allow host controllers to require R1B for CMD6 Ulf Hansson
2020-03-24 18:06 ` [PATCH 5.5.12 2/5] mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for erase/trim/discard Ulf Hansson
2020-03-24 18:06 ` [PATCH 5.5.12 3/5] mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for eMMC sleep command Ulf Hansson
2020-03-24 18:06 ` [PATCH 5.5.12 4/5] mmc: sdhci-omap: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY Ulf Hansson
2020-03-24 18:06 ` Ulf Hansson [this message]
2020-03-24 18:20 ` [PATCH 5.5.12 0/5] mmc: Fix some busy detect problems Anders Roxell
2020-03-26  2:51 ` Sasha Levin
2020-03-26  4:38   ` Naresh Kamboju
2020-03-26 10:51   ` Anders Roxell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200324180650.28819-6-ulf.hansson@linaro.org \
    --to=ulf.hansson@linaro.org \
    --cc=anders.roxell@linaro.org \
    --cc=bbiswas@nvidia.com \
    --cc=faiz_abbas@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=pgwipeout@gmail.com \
    --cc=sashal@kernel.org \
    --cc=skomatineni@nvidia.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-mmc Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mmc/0 linux-mmc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mmc linux-mmc/ https://lore.kernel.org/linux-mmc \
		linux-mmc@vger.kernel.org
	public-inbox-index linux-mmc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mmc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git