Skip to content

Commit bedf9fc

Browse files
ahunter6Ulf Hansson
authored andcommitted
mmc: sdhci: Workaround broken command queuing on Intel GLK
Command queuing has been reported broken on some Lenovo systems based on Intel GLK. This is likely a BIOS issue, so disable command queuing for Intel GLK if the BIOS vendor string is "LENOVO". Fixes: 8ee82bd ("mmc: sdhci-pci: Add CQHCI support for Intel GLK") Signed-off-by: Adrian Hunter <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent fe0acab commit bedf9fc

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

drivers/mmc/host/sdhci-pci-core.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <linux/mmc/slot-gpio.h>
2828
#include <linux/mmc/sdhci-pci-data.h>
2929
#include <linux/acpi.h>
30+
#include <linux/dmi.h>
3031

3132
#ifdef CONFIG_X86
3233
#include <asm/iosf_mbi.h>
@@ -783,11 +784,18 @@ static int byt_emmc_probe_slot(struct sdhci_pci_slot *slot)
783784
return 0;
784785
}
785786

787+
static bool glk_broken_cqhci(struct sdhci_pci_slot *slot)
788+
{
789+
return slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_GLK_EMMC &&
790+
dmi_match(DMI_BIOS_VENDOR, "LENOVO");
791+
}
792+
786793
static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot)
787794
{
788795
int ret = byt_emmc_probe_slot(slot);
789796

790-
slot->host->mmc->caps2 |= MMC_CAP2_CQE;
797+
if (!glk_broken_cqhci(slot))
798+
slot->host->mmc->caps2 |= MMC_CAP2_CQE;
791799

792800
if (slot->chip->pdev->device != PCI_DEVICE_ID_INTEL_GLK_EMMC) {
793801
slot->host->mmc->caps2 |= MMC_CAP2_HS400_ES,

0 commit comments

Comments
 (0)