diff options
author | Kai-Heng Feng <kai.heng.feng@canonical.com> | 2020-09-25 10:49:51 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2020-09-28 12:16:13 +0200 |
commit | 62c59a8786e6bb75569cee91dab66e9da3ff4b68 (patch) | |
tree | 4244bf7dba14ecfe300da986c6e59ba19f39d748 /include | |
parent | mmc: mmc_spi: Fix mmc_spi_dma_alloc() return type for !HAS_DMA (diff) | |
download | linux-62c59a8786e6bb75569cee91dab66e9da3ff4b68.tar.xz linux-62c59a8786e6bb75569cee91dab66e9da3ff4b68.zip |
memstick: Skip allocating card when removing host
After commit 6827ca573c03 ("memstick: rtsx_usb_ms: Support runtime power
management"), removing module rtsx_usb_ms will be stuck.
The deadlock is caused by powering on and powering off at the same time,
the former one is when memstick_check() is flushed, and the later is called
by memstick_remove_host().
Soe let's skip allocating card to prevent this issue.
Fixes: 6827ca573c03 ("memstick: rtsx_usb_ms: Support runtime power management")
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200925084952.13220-1-kai.heng.feng@canonical.com
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/memstick.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/memstick.h b/include/linux/memstick.h index da4c65f9435f..ebf73d4ee969 100644 --- a/include/linux/memstick.h +++ b/include/linux/memstick.h @@ -281,6 +281,7 @@ struct memstick_host { struct memstick_dev *card; unsigned int retries; + bool removing; /* Notify the host that some requests are pending. */ void (*request)(struct memstick_host *host); |