UPSTREAM: mmc: sdhci: Fix SDHCI_QUIRK_BROKEN_CQE
Previous to commit 511ce378e16f07 ("mmc: Add MMC host software queue support"), removing MMC_CAP2_CQE was enough to disable command queuing, but now the cqe_ops must also be NULL otherwise ->cqe_enable() will be called. Fix SDHCI_QUIRK_BROKEN_CQE to do that. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Fixes: 511ce378e16f07 ("mmc: Add MMC host software queue support") Link: https://lore.kernel.org/r/20200518120939.1399-1-adrian.hunter@intel.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 2b17b8d7cc65d333a48c6d32ee44fc489cecb7d9) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ibadc2a45340e9c783f836401910b44123a49f02f
This commit is contained in:
parent
1bd9ca0eb9
commit
2bef330246
@ -3896,9 +3896,6 @@ int sdhci_setup_host(struct sdhci_host *host)
|
||||
mmc_hostname(mmc), host->version);
|
||||
}
|
||||
|
||||
if (host->quirks & SDHCI_QUIRK_BROKEN_CQE)
|
||||
mmc->caps2 &= ~MMC_CAP2_CQE;
|
||||
|
||||
if (host->quirks & SDHCI_QUIRK_FORCE_DMA)
|
||||
host->flags |= SDHCI_USE_SDMA;
|
||||
else if (!(host->caps & SDHCI_CAN_DO_SDMA))
|
||||
@ -4418,6 +4415,12 @@ int __sdhci_add_host(struct sdhci_host *host)
|
||||
struct mmc_host *mmc = host->mmc;
|
||||
int ret;
|
||||
|
||||
if ((mmc->caps2 & MMC_CAP2_CQE) &&
|
||||
(host->quirks & SDHCI_QUIRK_BROKEN_CQE)) {
|
||||
mmc->caps2 &= ~MMC_CAP2_CQE;
|
||||
mmc->cqe_ops = NULL;
|
||||
}
|
||||
|
||||
host->complete_wq = alloc_workqueue("sdhci", flags, 0);
|
||||
if (!host->complete_wq)
|
||||
return -ENOMEM;
|
||||
|
Loading…
Reference in New Issue
Block a user