Skip to content

Commit 2270b89

Browse files
committed
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
2 parents 09a6b0b + afd7f30 commit 2270b89

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

drivers/memstick/core/memstick.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,9 @@ static void memstick_check(struct work_struct *work)
441441
} else if (host->card->stop)
442442
host->card->stop(host->card);
443443

444+
if (host->removing)
445+
goto out_power_off;
446+
444447
card = memstick_alloc_card(host);
445448

446449
if (!card) {
@@ -545,6 +548,7 @@ EXPORT_SYMBOL(memstick_add_host);
545548
*/
546549
void memstick_remove_host(struct memstick_host *host)
547550
{
551+
host->removing = 1;
548552
flush_workqueue(workqueue);
549553
mutex_lock(&host->lock);
550554
if (host->card)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,8 @@ static int byt_emmc_probe_slot(struct sdhci_pci_slot *slot)
794794
static bool glk_broken_cqhci(struct sdhci_pci_slot *slot)
795795
{
796796
return slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_GLK_EMMC &&
797-
dmi_match(DMI_BIOS_VENDOR, "LENOVO");
797+
(dmi_match(DMI_BIOS_VENDOR, "LENOVO") ||
798+
dmi_match(DMI_SYS_VENDOR, "IRBIS"));
798799
}
799800

800801
static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot)

include/linux/memstick.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ struct memstick_host {
281281

282282
struct memstick_dev *card;
283283
unsigned int retries;
284+
bool removing;
284285

285286
/* Notify the host that some requests are pending. */
286287
void (*request)(struct memstick_host *host);

0 commit comments

Comments
 (0)