summaryrefslogtreecommitdiff
path: root/drivers/mmc/core/queue.h
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2018-08-21 15:05:55 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2018-08-21 16:12:41 +0200
commit26caddf274cf1e89fd4ce44ab2b8dbc7a7f97681 (patch)
tree52b81204031618043211b80dc1c5adc0fa880e7d /drivers/mmc/core/queue.h
parent17e96d8516e31c3cb52cb8e2ee79d1d2e6948c11 (diff)
mmc: block: Fix unsupported parallel dispatch of requests
The mmc block driver does not support parallel dispatch of requests. In normal circumstances, all requests are anyway funneled through a single work item, so parallel dispatch never happens. However it can happen if there is no elevator. Fix that by detecting if a dispatch is in progress and returning busy (BLK_STS_RESOURCE) in that case Fixes: 81196976ed94 ("mmc: block: Add blk-mq support") Cc: stable@vger.kernel.org # v4.16+ Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/queue.h')
-rw-r--r--drivers/mmc/core/queue.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/core/queue.h b/drivers/mmc/core/queue.h
index 17e59d50b496..9bf3c9245075 100644
--- a/drivers/mmc/core/queue.h
+++ b/drivers/mmc/core/queue.h
@@ -81,6 +81,7 @@ struct mmc_queue {
unsigned int cqe_busy;
#define MMC_CQE_DCMD_BUSY BIT(0)
#define MMC_CQE_QUEUE_FULL BIT(1)
+ bool busy;
bool use_cqe;
bool recovery_needed;
bool in_recovery;