Skip to content

Commit 2b17b8d

Browse files
ahunter6storulf
authored andcommitted
mmc: sdhci: Fix SDHCI_QUIRK_BROKEN_CQE
Previous to commit 511ce37 ("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 <[email protected]> Fixes: 511ce37 ("mmc: Add MMC host software queue support") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent b9bbe6e commit 2b17b8d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

drivers/mmc/host/sdhci.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4000,9 +4000,6 @@ int sdhci_setup_host(struct sdhci_host *host)
40004000
mmc_hostname(mmc), host->version);
40014001
}
40024002

4003-
if (host->quirks & SDHCI_QUIRK_BROKEN_CQE)
4004-
mmc->caps2 &= ~MMC_CAP2_CQE;
4005-
40064003
if (host->quirks & SDHCI_QUIRK_FORCE_DMA)
40074004
host->flags |= SDHCI_USE_SDMA;
40084005
else if (!(host->caps & SDHCI_CAN_DO_SDMA))
@@ -4539,6 +4536,12 @@ int __sdhci_add_host(struct sdhci_host *host)
45394536
struct mmc_host *mmc = host->mmc;
45404537
int ret;
45414538

4539+
if ((mmc->caps2 & MMC_CAP2_CQE) &&
4540+
(host->quirks & SDHCI_QUIRK_BROKEN_CQE)) {
4541+
mmc->caps2 &= ~MMC_CAP2_CQE;
4542+
mmc->cqe_ops = NULL;
4543+
}
4544+
45424545
host->complete_wq = alloc_workqueue("sdhci", flags, 0);
45434546
if (!host->complete_wq)
45444547
return -ENOMEM;

0 commit comments

Comments
 (0)