This is a note to let you know that I've just added the patch titled mmc: sdhci: Add a quirk for broken command queuing to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mmc-sdhci-add-a-quirk-for-broken-command-queuing.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 75d27ea1abf7af3cc2cdec3513e74f52191605c8 Mon Sep 17 00:00:00 2001 From: Adrian Hunter <adrian.hunter@xxxxxxxxx> Date: Tue, 17 Dec 2019 11:53:49 +0200 Subject: mmc: sdhci: Add a quirk for broken command queuing From: Adrian Hunter <adrian.hunter@xxxxxxxxx> commit 75d27ea1abf7af3cc2cdec3513e74f52191605c8 upstream. Command queuing has been reported broken on some systems based on Intel GLK. A separate patch disables command queuing in some cases. This patch adds a quirk for broken command queuing, which enables users with problems to disable command queuing using sdhci module parameters for quirks. Fixes: 8ee82bda230f ("mmc: sdhci-pci: Add CQHCI support for Intel GLK") Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx Link: https://lore.kernel.org/r/20191217095349.14592-2-adrian.hunter@xxxxxxxxx Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/mmc/host/sdhci.c | 3 +++ drivers/mmc/host/sdhci.h | 2 ++ 2 files changed, 5 insertions(+) --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -3549,6 +3549,9 @@ int sdhci_setup_host(struct sdhci_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)) --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -391,6 +391,8 @@ struct sdhci_host { #define SDHCI_QUIRK_BROKEN_CARD_DETECTION (1<<15) /* Controller reports inverted write-protect state */ #define SDHCI_QUIRK_INVERTED_WRITE_PROTECT (1<<16) +/* Controller has unusable command queue engine */ +#define SDHCI_QUIRK_BROKEN_CQE (1<<17) /* Controller does not like fast PIO transfers */ #define SDHCI_QUIRK_PIO_NEEDS_DELAY (1<<18) /* Controller has to be forced to use block size of 2048 bytes */ Patches currently in stable-queue which might be from adrian.hunter@xxxxxxxxx are queue-4.19/revert-mmc-sdhci-fix-incorrect-switch-to-hs-mode.patch queue-4.19/x86-insn-add-some-intel-instructions-to-the-opcode-m.patch queue-4.19/libsubcmd-use-o0-with-debug-1.patch queue-4.19/mmc-sdhci-add-a-quirk-for-broken-command-queuing.patch queue-4.19/perf-tests-disable-bp_signal-testing-for-arm64.patch queue-4.19/mmc-sdhci-workaround-broken-command-queuing-on-intel-glk.patch queue-4.19/perf-tools-splice-events-onto-evlist-even-on-error.patch queue-4.19/perf-parse-if-pmu-configuration-fails-free-terms.patch