mmc: rpmb: fixes pause retune on all RPMB partitions.
authorJorge Ramirez-Ortiz <jorge@foundries.io>
Fri, 1 Dec 2023 15:31:43 +0000 (16:31 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 7 Dec 2023 13:54:33 +0000 (14:54 +0100)
commite7794c14fd73e5eb4a3e0ecaa5334d5a17377c50
treeaa52eb36e92fae6b7233367063248dd94b2f8169
parent8c124d998ea0c9022e247b11ac51f86ec8afa0e1
mmc: rpmb: fixes pause retune on all RPMB partitions.

When RPMB was converted to a character device, it added support for
multiple RPMB partitions (Commit 97548575bef3 ("mmc: block: Convert RPMB to
a character device").

One of the changes in this commit was transforming the variable target_part
defined in __mmc_blk_ioctl_cmd into a bitmask. This inadvertently regressed
the validation check done in mmc_blk_part_switch_pre() and
mmc_blk_part_switch_post(), so let's fix it.

Fixes: 97548575bef3 ("mmc: block: Convert RPMB to a character device")
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20231201153143.1449753-1-jorge@foundries.io
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/block.c