Skip to contentSkip to conversation

Support temporarily disable of the CMDQ mode

RFC PATCH In review Luca Porzio 1 participant 1 message Feb 15, 2021 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

cover Support temporarily disable of the CMDQ mode

eMMC protocol was born as single threaded and many use cases still expect single thread operation mode. Through time the Command Queue was developed and supported but many legacy operation are still performed using single thread mode.

An example is FFU operation performed by using mmc-utils which is currently broken for devices supporting CMDQ mode.

In order to enable legacy command sequences, we make cmdq_en sysfs parameter writeable: setting this parameter to zero will temporarily disable CMDQ mode and let legacy command sequence be supported.

Setting the cmdq_en parameter to one, will enable CMDQ mode back on.

Luca Porzio (2):
Remove unnecessary usage of use_cqe parameter in mmc_queue and use

    more appropriate mmc_host->cqe_enabled

Make cmdq_en attribute in sysfs, writeable. When 0 is written: -
CMDQ is disabled and kept disabled across device reboots. When 1 is
written: - CMDQ mode is instantly reneabled (if supported).

 drivers/mmc/core/block.c |   7 +-
 drivers/mmc/core/mmc.c   | 152 ++++++++++++++++++++++++++++++---------
 drivers/mmc/core/queue.c |  11 ++-
 drivers/mmc/core/queue.h |   1 -
 include/linux/mmc/card.h |   1 +
 5 files changed, 127 insertions(+), 45 deletions(-)
Signature · 1 line
2.17.1