]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
mmc: core: use mrq->sbc when sending CMD23 for RPMB
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 28 Mar 2019 12:35:08 +0000 (18:05 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 28 Mar 2019 14:32:15 +0000 (15:32 +0100)
commitdd12452659e7254f4c0129d2065ee41c2b57a6ff
tree4dda3b9bae891c9c2745f90d9b0345eeaf1df07e
parent46881fa6cae2fc4fb9e1922159fc4dce8540aec6
mmc: core: use mrq->sbc when sending CMD23 for RPMB

When sending out CMD23 in the blk preparation, the comment there
rightfully says:

 * However, it is not sufficient to just send CMD23,
 * and avoid the final CMD12, as on an error condition
 * CMD12 (stop) needs to be sent anyway. This, coupled
 * with Auto-CMD23 enhancements provided by some
 * hosts, means that the complexity of dealing
 * with this is best left to the host. If CMD23 is
 * supported by card and host, we'll fill sbc in and let
 * the host deal with handling it correctly.

Let's do this behaviour for RPMB as well, and not send CMD23
independently. Otherwise IP cores (like Renesas SDHI) may timeout
because of automatic CMD23/CMD12 handling.

Reported-by: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Clément Péron <peron.clem@gmail.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/mmc/core/block.c