* [PATCH] mmc: document 'Reliable Write' bit in uapi header
@ 2018-12-03 14:26 Wolfram Sang
2018-12-03 15:00 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2018-12-03 14:26 UTC (permalink / raw)
To: linux-mmc; +Cc: linux-renesas-soc, Avri Altman, Wolfram Sang
If we use it this way, people should know about it.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
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(-)
diff --git a/include/uapi/linux/mmc/ioctl.h b/include/uapi/linux/mmc/ioctl.h
index 45f369dc0a42..ae659333e73f 100644
--- a/include/uapi/linux/mmc/ioctl.h
+++ b/include/uapi/linux/mmc/ioctl.h
@@ -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 */
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: document 'Reliable Write' bit in uapi header
2018-12-03 14:26 [PATCH] mmc: document 'Reliable Write' bit in uapi header Wolfram Sang
@ 2018-12-03 15:00 ` Geert Uytterhoeven
2018-12-03 16:15 ` Wolfram Sang
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2018-12-03 15:00 UTC (permalink / raw)
To: Wolfram Sang; +Cc: Linux MMC List, Linux-Renesas, Avri.Altman
Hi Wolfram,
On Mon, Dec 3, 2018 at 3:27 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> If we use it this way, people should know about it.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>
> Still not super happy about shifting into the sign bit, but yeah...
> don't break userspace, I guess.
Indeed.
> include/uapi/linux/mmc/ioctl.h | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/mmc/ioctl.h b/include/uapi/linux/mmc/ioctl.h
> index 45f369dc0a42..ae659333e73f 100644
> --- a/include/uapi/linux/mmc/ioctl.h
> +++ b/include/uapi/linux/mmc/ioctl.h
> @@ -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?
> + * 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.
> + */
> int write_flag;
>
> /* Application-specific command. true = precede with CMD55 */
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: document 'Reliable Write' bit in uapi header
2018-12-03 15:00 ` Geert Uytterhoeven
@ 2018-12-03 16:15 ` Wolfram Sang
0 siblings, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2018-12-03 16:15 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Wolfram Sang, Linux MMC List, Linux-Renesas, Avri.Altman
[-- Attachment #1: Type: text/plain, Size: 668 bytes --]
> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Thanks, Geert!
> > - /* 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.
> > + * 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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-03 16:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-03 14:26 [PATCH] mmc: document 'Reliable Write' bit in uapi header Wolfram Sang
2018-12-03 15:00 ` Geert Uytterhoeven
2018-12-03 16:15 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).