On Wed, Jun 1, 2016 at 2:41 PM, Tomas Winkler <tomas.winkler@xxxxxxxxx> wrote: > Few storage technology such is EMMC, UFS, and NVMe support RPMB > hardware partition with common protocol and frame layout. > The RPMB partition cannot be accessed via standard block layer, but > by a set of specific commands: WRITE, READ, GET_WRITE_COUNTER, and > PROGRAM_KEY. >... If the same protocol is used by all these standards, why not export it directly (including the RESULT_READ command or not even knowing the command types)? While I would prefer an rpmb specific interface over the existing raw mmc command interface, all I need is an rpmb operation that lets me send and receive buffers without interruption. You can find our exiting user-space code here at https://android.googlesource.com/platform/system/core/+/master/trusty/storage/proxy/rpmb.c. If you use an interface more similar to this, I think your emmc and ufs specific code would be simpler. Also, if you don't need the in-kernel interface, the kernel would not need to know the details of the rpmb protocol at all. I have not tested your code, but it looks like we would have to modify the storage proxy to interpret the data it currently passes through and remove all RESULT_READ packets. -- Arve Hjønnevåg -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html