]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
mmc: sdhci-omap: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 24 Mar 2020 18:07:37 +0000 (19:07 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 3 Apr 2020 13:17:23 +0000 (15:17 +0200)
BugLink: https://bugs.launchpad.net/bugs/1870142
[ Upstream commit 055e04830d4544c57f2a5192a26c9e25915c29c0 ]

It has turned out that the sdhci-omap 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: Naresh Kamboju <naresh.kamboju@linaro.org>
Reported-by: Anders Roxell <anders.roxell@linaro.org>
Reported-by: Faiz Abbas <faiz_abbas@ti.com>
Cc: <stable@vger.kernel.org>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Tested-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
drivers/mmc/host/sdhci-omap.c

index 083e7e053c95401bcc6e87c6e8d5e3a52605e474..d3135249b2e4068f6fe4fb00c44613f4985addef 100644 (file)
@@ -1134,6 +1134,9 @@ static int sdhci_omap_probe(struct platform_device *pdev)
        host->mmc_host_ops.execute_tuning = sdhci_omap_execute_tuning;
        host->mmc_host_ops.enable_sdio_irq = sdhci_omap_enable_sdio_irq;
 
+       /* R1B responses is required to properly manage HW busy detection. */
+       mmc->caps |= MMC_CAP_NEED_RSP_BUSY;
+
        ret = sdhci_setup_host(host);
        if (ret)
                goto err_put_sync;