public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michał Mirosław" <mirqus@gmail.com>
To: John Calixto <john.calixto@modsystems.com>
Cc: linux-mmc@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Chris Ball <cjb@laptop.org>,
	Andrei Warkentin <andreiw@motorola.com>
Subject: Re: [PATCH v4] mmc: Add ioctl to let userspace apps send ACMDs
Date: Tue, 12 Apr 2011 16:21:38 +0200	[thread overview]
Message-ID: <BANLkTimn3vB1JaBfboOL0ayG2FpXsUMe7w@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1104111450340.32082@peruna>

2011/4/11 John Calixto <john.calixto@modsystems.com>:
[...]
> --- /dev/null
> +++ b/include/linux/mmc/ioctl.h
> @@ -0,0 +1,32 @@
> +#ifndef _MMC_IOCTL_H
> +#define _MMC_IOCTL_H
> +struct mmc_ioc_cmd {
> +       /* implies direction of data.  true = write, false = read */
> +       int write_flag;
> +
> +       __u32 opcode;
> +       __u32 arg;
> +       __u32 response[4];  /* CMD response */
> +       unsigned int flags;
> +       unsigned int blksz;
> +       unsigned int blocks;
> +
> +       /*
> +        * Sleep at least postsleep_min_us useconds, and at most
> +        * postsleep_max_us useconds *after* issuing command.  Needed for some
> +        * read commands for which cards have no other way of indicating
> +        * they're ready for the next command (i.e. there is no equivalent of a
> +        * "busy" indicator for read operations).
> +        */
> +       unsigned int postsleep_min_us;
> +       unsigned int postsleep_max_us;
> +
> +       /*
> +        * Override driver-computed timeouts.  Note the difference in units!
> +        */
> +       unsigned int data_timeout_ns;
> +       unsigned int cmd_timeout_ms;
> +       __u64 data_ptr;  /* DAT buffer */

This will be more natural if you have an anonymous union here:
union {
  __u64 data_ptr_l;
  void *data_ptr;
};

> +};
> +#define MMC_IOC_ACMD _IOWR(MMC_BLOCK_MAJOR, 0, struct mmc_ioc_cmd)
> +#endif  /* _MMC_IOCTL_H */

Best Regards,
Michał Mirosław

  reply	other threads:[~2011-04-12 14:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-11 21:47 mmc: Add ioctl to let userspace apps send ACMDs John Calixto
2011-04-11 21:55 ` [PATCH v4] " John Calixto
2011-04-12 14:21   ` Michał Mirosław [this message]
2011-04-12 21:51     ` John Calixto
2011-04-12 23:00     ` Arnd Bergmann
2011-04-12 23:08       ` John Calixto
2011-04-18 14:39         ` Arnd Bergmann
2011-04-18 16:30           ` John Calixto
2011-04-12 23:10   ` Arnd Bergmann
2011-04-12 23:40     ` John Calixto
2011-04-18 14:42       ` Arnd Bergmann
2011-04-18 16:37         ` John Calixto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTimn3vB1JaBfboOL0ayG2FpXsUMe7w@mail.gmail.com \
    --to=mirqus@gmail.com \
    --cc=andreiw@motorola.com \
    --cc=arnd@arndb.de \
    --cc=cjb@laptop.org \
    --cc=john.calixto@modsystems.com \
    --cc=linux-mmc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox