Thread (17 messages) flat view 17 messages, 6 authors, 2017-08-11

Re: [PATCH 4/5] RFC: mmc: block: Convert RPMB to a character device

From: Linus Walleij <hidden>
Date: 2017-08-11 09:31:49
Also in: linux-mmc

On Mon, Jun 19, 2017 at 11:18 PM, Tomas Winkler [off-list ref] wrote:
That's correct, I guess someone didn't read the spec till the end when
adding rpmb block device.
though also looks like that the software guys where drinking up in the
bar while jdec committee has met.
:D
quoted
+/* Device type for RPMB character devices */
+static dev_t rpmb_devt;
This is mmc_rpmb device not 'rpmb' as there are other storage devices
that provide RPMB partition.
OK fixed it.
quoted
+
+/* Bus type for RPMB character devices */
+static struct bus_type rpmb_bus_type = {
+       .name = "rpmb",
+};
Same here, mmc_rpmb_... , and other place bellow.
OK fixed it.
quoted
+struct mmc_rpmb_data {
(...)
would keep also partition access bit needed for the partition switching.
(...)
quoted
 static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct mmc_blk_data *md,
-                              struct mmc_blk_ioc_data *idata)
+                              struct mmc_blk_ioc_data *idata, bool rpmb_ioctl)
Don't remember now if this is for eMMC but in future there might be
more then one RPMB partition  on the device
and boolean will not work here. rather use target_part, tho bits are
exhausted there too.
(...)
quoted
-       bool is_rpmb = false;
+       unsigned int target_part;
should come as a function input.
(...)
quoted
+                       ret = mmc_blk_alloc_rpmb_part(card, md,
+                               card->part[idx].size >> 9,
+                               card->part[idx].name);
Extract partition access bits form    card->part[idx].part_cfg,
OK I am trying my best with this too...

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help