From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Calixto Subject: Re: [PATCH v4] mmc: Add ioctl to let userspace apps send ACMDs Date: Tue, 12 Apr 2011 14:51:47 -0700 (PDT) Message-ID: References: Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-1463811328-279189751-1302645114=:8483" Return-path: Received: from elasmtp-galgo.atl.sa.earthlink.net ([209.86.89.61]:35693 "EHLO elasmtp-galgo.atl.sa.earthlink.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932332Ab1DLVv7 (ORCPT ); Tue, 12 Apr 2011 17:51:59 -0400 In-Reply-To: Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: =?ISO-8859-2?Q?Micha=B3_Miros=B3aw?= Cc: linux-mmc@vger.kernel.org, Arnd Bergmann , Chris Ball , Andrei Warkentin This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1463811328-279189751-1302645114=:8483 Content-Type: TEXT/PLAIN; charset=ISO-8859-2 Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 12 Apr 2011, Micha=B3 Miros=B3aw wrote: > 2011/4/11 John Calixto : > [...] > > --- /dev/null > > +++ b/include/linux/mmc/ioctl.h > > @@ -0,0 +1,32 @@ > > +#ifndef _MMC_IOCTL_H > > +#define _MMC_IOCTL_H > > +struct mmc_ioc_cmd { > > + =A0 =A0 =A0 /* implies direction of data. =A0true =3D write, false = =3D read */ > > + =A0 =A0 =A0 int write_flag; > > + > > + =A0 =A0 =A0 __u32 opcode; > > + =A0 =A0 =A0 __u32 arg; > > + =A0 =A0 =A0 __u32 response[4]; =A0/* CMD response */ > > + =A0 =A0 =A0 unsigned int flags; > > + =A0 =A0 =A0 unsigned int blksz; > > + =A0 =A0 =A0 unsigned int blocks; > > + > > + =A0 =A0 =A0 /* > > + =A0 =A0 =A0 =A0* Sleep at least postsleep_min_us useconds, and at mos= t > > + =A0 =A0 =A0 =A0* postsleep_max_us useconds *after* issuing command. = =A0Needed for some > > + =A0 =A0 =A0 =A0* read commands for which cards have no other way of i= ndicating > > + =A0 =A0 =A0 =A0* they're ready for the next command (i.e. there is no= equivalent of a > > + =A0 =A0 =A0 =A0* "busy" indicator for read operations). > > + =A0 =A0 =A0 =A0*/ > > + =A0 =A0 =A0 unsigned int postsleep_min_us; > > + =A0 =A0 =A0 unsigned int postsleep_max_us; > > + > > + =A0 =A0 =A0 /* > > + =A0 =A0 =A0 =A0* Override driver-computed timeouts. =A0Note the diffe= rence in units! > > + =A0 =A0 =A0 =A0*/ > > + =A0 =A0 =A0 unsigned int data_timeout_ns; > > + =A0 =A0 =A0 unsigned int cmd_timeout_ms; > > + =A0 =A0 =A0 __u64 data_ptr; =A0/* DAT buffer */ >=20 > This will be more natural if you have an anonymous union here: > union { > __u64 data_ptr_l; > void *data_ptr; > }; >=20 Ah, but of course! Thanks! John ---1463811328-279189751-1302645114=:8483--