mmc: block: add handling for two parallel block requests in issue_rw_rq(emmc)
authorPer Forlin <per.forlin@linaro.org>
Fri, 1 Jul 2011 16:55:33 +0000 (18:55 +0200)
committerkfx <kfx@rock-chips.com>
Mon, 8 Jul 2013 08:29:50 +0000 (16:29 +0800)
commit1db93c3593381dd716685e01856c7680113363c5
tree12ac3fdc25221662f7a12693c00b38d945b647be
parentaa4812bdf22211b0d9d2006cafad1ef40aa8aefe
mmc: block: add handling for two parallel block requests in issue_rw_rq(emmc)

Change mmc_blk_issue_rw_rq() to become asynchronous.
The execution flow looks like this:

* The mmc-queue calls issue_rw_rq(), which sends the request
  to the host and returns back to the mmc-queue.
* The mmc-queue calls issue_rw_rq() again with a new request.
* This new request is prepared in issue_rw_rq(), then it waits for
  the active request to complete before pushing it to the host.
* When the mmc-queue is empty it will call issue_rw_rq() with a NULL
  req to finish off the active request without starting a new request.

Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Venkatraman S <svenkatr@ti.com>
Tested-by: Sourav Poddar <sourav.poddar@ti.com>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Conflicts:
drivers/mmc/card/block.c
drivers/mmc/card/block.c
drivers/mmc/card/queue.c
drivers/mmc/card/queue.h