Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 203011 - kernel patch for using joysticks in 32 bit applications on 64 bit systems
Summary: kernel patch for using joysticks in 32 bit applications on 64 bit systems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: http://bugzilla.kernel.org/show_bug.c...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-22 13:41 UTC by Ákos Maróy
Modified: 2011-06-28 09:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ákos Maróy 2007-12-22 13:41:16 UTC
unfortunately 32 bit apps don't see the joysticks on a 64 bit system. this prevents one playing X-Plane (http://www.x-plane.com/) or other 32-bit games with joysticks.

this is a know issue, and already raised several times:

http://readlist.com/lists/vger.kernel.org/linux-kernel/28/144411.html

http://www.brettcsmith.org/wiki/wiki.cgi?action=browse&diff=1&id=OzyComputer/Joystick

unfortunately this is still not fixed in the mainline kernel.

it would be nice to have this in gentoo-sources though, so that at least gentoo users can play these games nicely :)

the following patch solves the problem:


diff -Naur linux-2.6.22-suspend2-r2/fs/compat_ioctl.c linux-2.6.22-suspend2-r2-joystick/fs/compat_ioctl.c
--- linux-2.6.22-suspend2-r2/fs/compat_ioctl.c  2007-12-22 14:08:14.000000000 +0100
+++ linux-2.6.22-suspend2-r2-joystick/fs/compat_ioctl.c 2007-12-22 14:07:54.000000000 +0100
@@ -10,6 +10,8 @@
  * ioctls.
  */
 
+#include <linux/joystick.h>
+
 #include <linux/types.h>
 #include <linux/compat.h>
 #include <linux/kernel.h>
@@ -3259,6 +3261,12 @@
 COMPATIBLE_IOCTL(VIDEO_GET_SIZE)
 COMPATIBLE_IOCTL(VIDEO_GET_FRAME_RATE)
 
+/* joystick */
+COMPATIBLE_IOCTL(JSIOCGVERSION)
+COMPATIBLE_IOCTL(JSIOCGAXES)
+COMPATIBLE_IOCTL(JSIOCGBUTTONS)
+COMPATIBLE_IOCTL(JSIOCGNAME(0x200)) /* for X-Plane 8.03 */
+
 /* now things that need handlers */
 HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob)
 HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob)


Reproducible: Always
Comment 1 Mike Pagano gentoo-dev 2008-01-01 21:47:14 UTC
According to our policy, we generally do not put patches into gentoo-sources that have not been accepted upstream.

I see this was resubmitted upstream at: http://lkml.org/lkml/2007/12/22/73 but this patch was rejected previously in 2005 for using obsolete methods:
http://readlist.com/lists/vger.kernel.org/linux-kernel/28/144445.html



Comment 2 Ákos Maróy 2008-01-02 08:11:36 UTC
I see. I've also submitted the patch upstream, see here: http://bugzilla.kernel.org/show_bug.cgi?id=9652
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2008-02-07 12:34:10 UTC
Will track the upstream bug report.