Re: [PATCH v7 2/4] mmc: block: register RPMB partition with the RPMB subsystem

From: Linus Walleij
Date: Wed May 29 2024 - 03:39:54 EST


On Mon, May 27, 2024 at 2:14 PM Jens Wiklander
<jens.wiklander@xxxxxxxxxx> wrote:

> Register eMMC RPMB partition with the RPMB subsystem and provide
> an implementation for the RPMB access operations abstracting
> the actual multi step process.
>
> Add a callback to extract the needed device information at registration
> to avoid accessing the struct mmc_card at a later stage as we're not
> holding a reference counter for this struct.
>
> Taking the needed reference to md->disk in mmc_blk_alloc_rpmb_part()
> instead of in mmc_rpmb_chrdev_open(). This is needed by the
> route_frames() function pointer in struct rpmb_ops.
>
> Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx>
> Signed-off-by: Alexander Usyskin <alexander.usyskin@xxxxxxxxx>
> Signed-off-by: Jens Wiklander <jens.wiklander@xxxxxxxxxx>
> Tested-by: Manuel Traut <manut@xxxxxxxxx>

Very nice code!
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Yours,
Linus Walleij