Commit 2270b890 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'mmc-v5.9-rc4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC fixes from Ulf Hansson:

 - Fix deadlock when removing MEMSTICK host

 - Workaround broken CMDQ on Intel GLK based IRBIS models

* tag 'mmc-v5.9-rc4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  mmc: sdhci: Workaround broken command queuing on Intel GLK based IRBIS models
  memstick: Skip allocating card when removing host
parents 09a6b0bc afd7f308
...@@ -441,6 +441,9 @@ static void memstick_check(struct work_struct *work) ...@@ -441,6 +441,9 @@ static void memstick_check(struct work_struct *work)
} else if (host->card->stop) } else if (host->card->stop)
host->card->stop(host->card); host->card->stop(host->card);
if (host->removing)
goto out_power_off;
card = memstick_alloc_card(host); card = memstick_alloc_card(host);
if (!card) { if (!card) {
...@@ -545,6 +548,7 @@ EXPORT_SYMBOL(memstick_add_host); ...@@ -545,6 +548,7 @@ EXPORT_SYMBOL(memstick_add_host);
*/ */
void memstick_remove_host(struct memstick_host *host) void memstick_remove_host(struct memstick_host *host)
{ {
host->removing = 1;
flush_workqueue(workqueue); flush_workqueue(workqueue);
mutex_lock(&host->lock); mutex_lock(&host->lock);
if (host->card) if (host->card)
......
...@@ -794,7 +794,8 @@ static int byt_emmc_probe_slot(struct sdhci_pci_slot *slot) ...@@ -794,7 +794,8 @@ static int byt_emmc_probe_slot(struct sdhci_pci_slot *slot)
static bool glk_broken_cqhci(struct sdhci_pci_slot *slot) static bool glk_broken_cqhci(struct sdhci_pci_slot *slot)
{ {
return slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_GLK_EMMC && return slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_GLK_EMMC &&
dmi_match(DMI_BIOS_VENDOR, "LENOVO"); (dmi_match(DMI_BIOS_VENDOR, "LENOVO") ||
dmi_match(DMI_SYS_VENDOR, "IRBIS"));
} }
static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot) static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot)
......
...@@ -281,6 +281,7 @@ struct memstick_host { ...@@ -281,6 +281,7 @@ struct memstick_host {
struct memstick_dev *card; struct memstick_dev *card;
unsigned int retries; unsigned int retries;
bool removing;
/* Notify the host that some requests are pending. */ /* Notify the host that some requests are pending. */
void (*request)(struct memstick_host *host); void (*request)(struct memstick_host *host);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment