From: John Calixto <john.calixto@modsystems.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-mmc@vger.kernel.org, cjb@laptop.org
Subject: RE: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs
Date: Fri, 18 Mar 2011 17:24:15 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.00.1103181706450.6084@peruna> (raw)
In-Reply-To: <201103172255.51442.arnd@arndb.de>
Hello Arnd,
I need some clarification on the last bit of your initial feedback below:
On Thu, 17 Mar 2011, Arnd Bergmann wrote:
> On Thursday 17 March 2011 19:28:55 John Calixto wrote:
<snip>
> > diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c
> > index 797cdb5..0453dcd 100644
> > --- a/drivers/mmc/core/sd_ops.c
> > +++ b/drivers/mmc/core/sd_ops.c
> > @@ -20,7 +20,7 @@
> > #include "core.h"
> > #include "sd_ops.h"
> >
> > -static int mmc_app_cmd(struct mmc_host *host, struct mmc_card *card)
> > +int mmc_app_cmd(struct mmc_host *host, struct mmc_card *card)
> > {
> > int err;
> > struct mmc_command cmd;
> > @@ -48,6 +48,7 @@ static int mmc_app_cmd(struct mmc_host *host, struct mmc_card *card)
> >
> > return 0;
> > }
> > +EXPORT_SYMBOL(mmc_app_cmd);
>
> Why not EXPORT_SYMBOL_GPL?
>
I was just using the convention already used in sd_ops.c. I can send a
pre-patch that sets all of the symbol exports in that file to be
EXPORT_SYMBOL_GPL, but without confirmation from you and others on this
list, that seems like overstepping my "jurisdiction". Is that preferable?
> > @@ -84,5 +86,21 @@
> > #define SD_SWITCH_ACCESS_DEF 0
> > #define SD_SWITCH_ACCESS_HS 1
> >
> > +struct sd_ioc_cmd {
> > + unsigned int struct_version;
> > +#define SD_IOC_CMD_STRUCT_VERSION 0
> > + int write_flag; /* implies direction of data. true = write, false = read */
> > + unsigned int opcode;
> > + unsigned int arg;
> > + unsigned int flags;
> > + unsigned int postsleep_us; /* apply usecond delay *after* issuing command */
> > + unsigned int force_timeout_ns; /* force timeout to be force_timeout_ns ns */
> > + unsigned int response[4]; /* CMD response */
> > + unsigned int blksz;
> > + unsigned int blocks;
> > + unsigned char *data; /* DAT buffer */
> > +};
> > +#define SD_IOC_ACMD _IOWR(MMC_BLOCK_MAJOR, 0, struct sd_ioc_cmd *)
> > +
> > #endif
> >
>
> As I mentioned, any ioctl command that gets introduced needs to be
> designed very carefully to make sure we don't need to change it in the
> future. The only two things I can see here are:
>
> * The struct_version should be removed
> * The data pointer is not compatible between 32 and 64 bits.
> One solution for this would be to make it a __u64 argument
> and require the user to cast the pointer to a 64 bit type.
>
> Arnd
I don't understand your comment about the data pointer not being
compatible between 32 and 64 bits. Wouldn't the compiler take care of
pointer size?
Thanks,
John
next prev parent reply other threads:[~2011-03-19 0:24 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-17 18:28 [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs John Calixto
2011-03-17 18:35 ` Ben Dooks
2011-03-17 21:55 ` Arnd Bergmann
2011-03-18 17:32 ` John Calixto
2011-03-18 17:56 ` Michał Mirosław
2011-03-18 19:26 ` Arnd Bergmann
2011-03-19 17:36 ` Michał Mirosław
2011-03-19 19:00 ` Arnd Bergmann
2011-03-21 18:37 ` John Calixto
2011-03-21 23:16 ` Michał Mirosław
2011-03-22 22:31 ` John Calixto
2011-03-23 0:18 ` Michał Mirosław
2011-03-23 0:44 ` John Calixto
2011-03-23 7:57 ` Arnd Bergmann
2011-03-18 19:25 ` Arnd Bergmann
2011-03-18 22:06 ` [PATCH resend] mmc: Added ioctl to let userspace apps send ACMD John Calixto
2011-03-19 11:52 ` Arnd Bergmann
2011-03-20 2:12 ` John Calixto
2011-03-20 5:11 ` Michał Mirosław
2011-03-21 12:25 ` Arnd Bergmann
2011-03-21 14:26 ` Andrei Warkentin
2011-03-21 18:22 ` John Calixto
2011-03-19 0:24 ` John Calixto [this message]
2011-03-19 9:42 ` [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs Arnd Bergmann
2011-03-19 16:09 ` Chris Ball
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=alpine.DEB.2.00.1103181706450.6084@peruna \
--to=john.calixto@modsystems.com \
--cc=arnd@arndb.de \
--cc=cjb@laptop.org \
--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