[PATCH] resend: compat ioctl for submiting URB

2005-02-07 Thread Christopher Li
Here is the resend of the patch to support compatible URB ioctl on 64 bit systems. This version already incorporate some feed back I get from the list and I have not get any new input yet. Change Log: - Let usbdevfs directly handle 32 bit URB ioctl. More specifically: USBDEVFS_SUBMITURB32,

[PATCH] resend: compat ioctl for submiting URB

2005-02-07 Thread Christopher Li
Here is the resend of the patch to support compatible URB ioctl on 64 bit systems. This version already incorporate some feed back I get from the list and I have not get any new input yet. Change Log: - Let usbdevfs directly handle 32 bit URB ioctl. More specifically: USBDEVFS_SUBMITURB32,

[PATCH] compat USB ioctl take II was Re: compat ioctl for submiting URB

2005-01-29 Thread Christopher Li
On Sat, Jan 29, 2005 at 07:33:31AM +0100, Andi Kleen wrote: > Issues: > - Should use CONFIG_COMPAT, not x86-64 specific symbols Fixed. > - Why can't you set URB_COMPAT transparently in the emulation > layer? Then existing applications would hopefully work without > changes, right? Now I see it.

Re: compat ioctl for submiting URB

2005-01-29 Thread Christopher Li
On Sat, Jan 29, 2005 at 07:33:31AM +0100, Andi Kleen wrote: > > Looks reasonable from a first look. > > Issues: > - Should use CONFIG_COMPAT, not x86-64 specific symbols Agree. > - Why can't you set URB_COMPAT transparently in the emulation > layer? Then existing applications would hopefully

Re: compat ioctl for submiting URB

2005-01-29 Thread Christopher Li
It is nice to know all that. I guess I did not know much about the other 64 bit systems. I will update and resend my patch. Thanks! Chris On Fri, Jan 28, 2005 at 09:45:38PM -0800, Roland Dreier wrote: > Christopher> This patch is for the case that running 32 bit > Christopher>

Re: compat ioctl for submiting URB

2005-01-29 Thread Christopher Li
It is nice to know all that. I guess I did not know much about the other 64 bit systems. I will update and resend my patch. Thanks! Chris On Fri, Jan 28, 2005 at 09:45:38PM -0800, Roland Dreier wrote: Christopher This patch is for the case that running 32 bit Christopher application

Re: compat ioctl for submiting URB

2005-01-29 Thread Christopher Li
On Sat, Jan 29, 2005 at 07:33:31AM +0100, Andi Kleen wrote: Looks reasonable from a first look. Issues: - Should use CONFIG_COMPAT, not x86-64 specific symbols Agree. - Why can't you set URB_COMPAT transparently in the emulation layer? Then existing applications would hopefully work

[PATCH] compat USB ioctl take II was Re: compat ioctl for submiting URB

2005-01-29 Thread Christopher Li
On Sat, Jan 29, 2005 at 07:33:31AM +0100, Andi Kleen wrote: Issues: - Should use CONFIG_COMPAT, not x86-64 specific symbols Fixed. - Why can't you set URB_COMPAT transparently in the emulation layer? Then existing applications would hopefully work without changes, right? Now I see it. That

Re: compat ioctl for submiting URB

2005-01-28 Thread Andi Kleen
Christopher Li <[EMAIL PROTECTED]> writes: > VMware is a big user of the usbdevfs, we translate guest USB > IO to usbdevfs, by submitting URB. On the x86_64 system, we > need those compatible ioctl for submitting URBs. For now we > make a hack to submit it through the vmmon driver. But that > is

Re: compat ioctl for submiting URB

2005-01-28 Thread Andi Kleen
Christopher Li <[EMAIL PROTECTED]> writes: > This patch is for the case that running 32 bit application on > a 64 bit kernel. So far only x86_64 allow you to do that. > > I am not aware of other 64bit architecture need the 32bit > emulation. A lot of them do. Just use CONFIG_COMPAT instead.

Re: compat ioctl for submiting URB

2005-01-28 Thread Al Viro
On Fri, Jan 28, 2005 at 08:33:05PM -0500, Christopher Li wrote: > This patch is for the case that running 32 bit application on > a 64 bit kernel. So far only x86_64 allow you to do that. > > I am not aware of other 64bit architecture need the 32bit > emulation. Huh??? a) ppc64 runs

Re: compat ioctl for submiting URB

2005-01-28 Thread Roland Dreier
Christopher> This patch is for the case that running 32 bit Christopher> application on a 64 bit kernel. So far only x86_64 Christopher> allow you to do that. Actually, at least ia64, mips, parisc, ppc64, s390 and sparc64 also support 32-bit applications on a 64-bit kernel. All of

Re: compat ioctl for submiting URB

2005-01-28 Thread Christopher Li
This patch is for the case that running 32 bit application on a 64 bit kernel. So far only x86_64 allow you to do that. I am not aware of other 64bit architecture need the 32bit emulation. Chris On Sat, Jan 29, 2005 at 04:29:51AM +, Gianni Tedesco wrote: > On Fri, 2005-01-28 at 16:23 -0500,

Re: compat ioctl for submiting URB

2005-01-28 Thread Gianni Tedesco
On Fri, 2005-01-28 at 16:23 -0500, Christopher Li wrote: > +#ifdef CONFIG_IA32_EMULATION > + > + case USBDEVFS_SUBMITURB32: > + snoop(>dev, "%s: SUBMITURB32\n", __FUNCTION__); > + ret = proc_submiturb_compat(ps, p); > + if (ret >= 0) > +

compat ioctl for submiting URB

2005-01-28 Thread Christopher Li
Hi, The compatible ioctl is missing for submitting URB from 32 bit application on a x86_64 system. For people who need to refresh their mind, please read the big comment after do_usbdevfs_bulk in fs/compat_ioctl.c VMware is a big user of the usbdevfs, we translate guest USB IO to usbdevfs, by

compat ioctl for submiting URB

2005-01-28 Thread Christopher Li
Hi, The compatible ioctl is missing for submitting URB from 32 bit application on a x86_64 system. For people who need to refresh their mind, please read the big comment after do_usbdevfs_bulk in fs/compat_ioctl.c VMware is a big user of the usbdevfs, we translate guest USB IO to usbdevfs, by

Re: compat ioctl for submiting URB

2005-01-28 Thread Gianni Tedesco
On Fri, 2005-01-28 at 16:23 -0500, Christopher Li wrote: +#ifdef CONFIG_IA32_EMULATION + + case USBDEVFS_SUBMITURB32: + snoop(dev-dev, %s: SUBMITURB32\n, __FUNCTION__); + ret = proc_submiturb_compat(ps, p); + if (ret = 0) +

Re: compat ioctl for submiting URB

2005-01-28 Thread Christopher Li
This patch is for the case that running 32 bit application on a 64 bit kernel. So far only x86_64 allow you to do that. I am not aware of other 64bit architecture need the 32bit emulation. Chris On Sat, Jan 29, 2005 at 04:29:51AM +, Gianni Tedesco wrote: On Fri, 2005-01-28 at 16:23 -0500,

Re: compat ioctl for submiting URB

2005-01-28 Thread Roland Dreier
Christopher This patch is for the case that running 32 bit Christopher application on a 64 bit kernel. So far only x86_64 Christopher allow you to do that. Actually, at least ia64, mips, parisc, ppc64, s390 and sparc64 also support 32-bit applications on a 64-bit kernel. All of those

Re: compat ioctl for submiting URB

2005-01-28 Thread Al Viro
On Fri, Jan 28, 2005 at 08:33:05PM -0500, Christopher Li wrote: This patch is for the case that running 32 bit application on a 64 bit kernel. So far only x86_64 allow you to do that. I am not aware of other 64bit architecture need the 32bit emulation. Huh??? a) ppc64 runs ppc32

Re: compat ioctl for submiting URB

2005-01-28 Thread Andi Kleen
Christopher Li [EMAIL PROTECTED] writes: This patch is for the case that running 32 bit application on a 64 bit kernel. So far only x86_64 allow you to do that. I am not aware of other 64bit architecture need the 32bit emulation. A lot of them do. Just use CONFIG_COMPAT instead. -Andi - To

Re: compat ioctl for submiting URB

2005-01-28 Thread Andi Kleen
Christopher Li [EMAIL PROTECTED] writes: VMware is a big user of the usbdevfs, we translate guest USB IO to usbdevfs, by submitting URB. On the x86_64 system, we need those compatible ioctl for submitting URBs. For now we make a hack to submit it through the vmmon driver. But that is very