mmc: document 'Reliable Write' bit in uapi header
PATCH 1/1 mmc: document 'Reliable Write' bit in uapi header
If we use it this way, people should know about it.
---
Still not super happy about shifting into the sign bit, but yeah... don't break userspace, I guess.
include/uapi/linux/mmc/ioctl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
include/uapi/linux/mmc/ioctl.h +4 -1
@@ -5,7 +5,10 @@#include <linux/types.h> struct mmc_ioc_cmd { -/* Implies direction of data. true = write, false = read */ +/* +* Implies direction of data. true = write, false = read. +* Bit 31 selects 'Reliable Write' for RPMB. +*/ int write_flag;/* Application-specific command. true = precede with CMD55 */
Signature · 1 line
2.11.0
Hi Wolfram,
Quoted 3 lines · Wolfram Sang
If we use it this way, people should know about it.
Signed-off-by Wolfram Sang <[email protected]>
Quoted 4 lines
---
Still not super happy about shifting into the sign bit, but yeah... don't break userspace, I guess.
Indeed.
Quoted 8 lines
include/uapi/linux/mmc/ioctl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)include/uapi/linux/mmc/ioctl.h +0
-0
include/uapi/linux/mmc/ioctl.h line 9
Quoted 6 lines
include/uapi/linux/mmc/ioctl.h +2
-1@@ -5,7 +5,10 @@#include <linux/types.h> struct mmc_ioc_cmd { -/* Implies direction of data. true = write, false = read */ +/* +* Implies direction of data. true = write, false = read.
nonzero = write, zero = read?
include/uapi/linux/mmc/ioctl.h line 10
Quoted 1 line
include/uapi/linux/mmc/ioctl.h +1
-0+* Bit 31 selects 'Reliable Write' for RPMB.
Perhaps having a #define for this would be nice?
Can also be used by the driver, instead of 1 << 31, which some static analyzers may complain about.
include/uapi/linux/mmc/ioctl.h line 14
Quoted 4 lines
include/uapi/linux/mmc/ioctl.h +1
-0+*/ int write_flag;/* Application-specific command. true = precede with CMD55 */
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 4 lines
Quoted 2 lines
Signed-off-by Wolfram Sang <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>
Thanks, Geert!
Quoted 5 lines
include/uapi/linux/mmc/ioctl.h line 9
Quoted 3 lines
include/uapi/linux/mmc/ioctl.h +2
-1-/* Implies direction of data. true = write, false = read */ +/* +* Implies direction of data. true = write, false = read. nonzero = write, zero = read?
Yes, even better. Will update.
Quoted 5 lines
Quoted 1 line
+ * Bit 31 selects 'Reliable Write' for RPMB.
Perhaps having a #define for this would be nice?
Can also be used by the driver, instead of 1 << 31, which some static analyzers may complain about.
Maybe. Should be an incremental patch then, I'd say.