From: Adrian Hunter <adrian.hun...@intel.com> In preparation to support the use of the RPMB partition with transfer modes that might require re-tuning, always switch back to the main area after RPMB access.
RPMB is accessible only via IOCTL so only those paths are affected. Signed-off-by: Adrian Hunter <adrian.hun...@intel.com> Signed-off-by: Ulf Hansson <ulf.hans...@linaro.org> (cherry picked from commit 3c866568aff7dcfc0bbd5ffc7fcc34fa8f100f67) Signed-off-by: Lim Key Seong <key.seong....@intel.com> --- drivers/mmc/card/block.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 5e9ce55..6887025 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -614,6 +614,10 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev, err = __mmc_blk_ioctl_cmd(card, md, idata); + /* Always switch back to main area after RPMB access */ + if (md->area_type & MMC_BLK_DATA_AREA_RPMB) + mmc_blk_part_switch(card, dev_get_drvdata(&card->dev)); + mmc_put_card(card); if (!err) @@ -677,6 +681,10 @@ static int mmc_blk_ioctl_multi_cmd(struct block_device *bdev, } } + /* Always switch back to main area after RPMB access */ + if (md->area_type & MMC_BLK_DATA_AREA_RPMB) + mmc_blk_part_switch(card, dev_get_drvdata(&card->dev)); + mmc_put_card(card); /* copy to user if data and response */ -- 1.9.1 -- _______________________________________________ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto