lkml.org 
[lkml]   [2005]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] macros to detect existance of unlocked_ioctl and ioctl_compat
On Thu, Jan 06, 2005 at 09:44:31PM +0100, Andi Kleen wrote:
> On Thu, Jan 06, 2005 at 11:59:59AM -0800, David S. Miller wrote:
> > On Thu, 6 Jan 2005 20:51:44 +0100
> > Andi Kleen <ak@suse.de> wrote:
> >
> > > DaveM can probably give you more details since he tried unsucessfully
> > > to make it work. I think the problem is that there is no enough
> > > information for the compat layer to convert everything.
> >
> > When the usbfs async stuff writes back the status, we are no
> > longer within the original syscall/ioctl execution any more,
> > therefore we don't know if we're doing this for a compat task
> > or not.
>
> [...]
>
> Thanks Dave for the update. I misremembered and I don't think
> I can fix this up for x86-64. We'll need a new interface of some sort.

Poor man way of doing this is just ripping ioctl-related code from usb's devio.c
to separate file, and build this file twice, once for native_ioctl and 64bit
urb structure, and once for compat_ioctl and 32bit urb structure.

I see no reason why it should not work for apps which submit & reap URBs through
32bit or 64bit API exclusively, without mixing them (and when you mix them,
you'll get reasonable error that you did not submit specified URB).

Only problem is that after that USB code "knows" about 32bit API. But it is
intention of compat_ioctl, no?
Petr

P.S.: When designing new API, please do not make it unnecessary complicated.
USB video needs rather large bandwidth and low latency, so please no ASCII
strings, and scatter-gather aware API helps a bit...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.178 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site