]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: block: Introduce queue semantics
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 13 Mar 2017 12:36:35 +0000 (14:36 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 24 Apr 2017 19:42:00 +0000 (21:42 +0200)
commit3b6c83739da720b10f29db33418a5028fe3d8881
tree4637e5764e797b5e97b3327433b4c9d9d2927405
parent21fd5de439dfab60f56e5cc1124ad7cb59427967
mmc: block: Introduce queue semantics

Change from viewing the requests in progress as 'current' and 'previous',
to viewing them as a queue. The current request is allocated to the first
free slot. The presence of incomplete requests is determined from the
count (mq->qcnt) of entries in the queue. Non-read-write requests (i.e.
discards and flushes) are not added to the queue at all and require no
special handling. Also no special handling is needed for the
MMC_BLK_NEW_REQUEST case.

As well as allowing an arbitrarily sized queue, the queue thread function
is significantly simpler.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/block.c
drivers/mmc/core/queue.c
drivers/mmc/core/queue.h