linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: [PATCH] 2.6: joydev is too eager claiming input devices
@ 2003-09-25  3:03 Dan
  2003-09-25  3:54 ` Dmitry Torokhov
  2003-09-25  5:12 ` Dmitry Torokhov
  0 siblings, 2 replies; 9+ messages in thread
From: Dan @ 2003-09-25  3:03 UTC (permalink / raw)
  To: dtor_core, linux-kernel

This patch seems to have broken my Logitech Wingman Action usb gamepad,
it shows as connected but isn't claimed by joydev... another joystick I
have (saitek cyborg usb gold) works fine, and the logitech worked in
previous 2.5/6.x kernels so I'm guessing this patch is to blame, I'm on
2.6.0-test5-mm1, is there any info from the joystick I can provide you
with to fix it?  I'm not sure where to look, thanks -Dan



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] 2.6: joydev is too eager claiming input devices
  2003-09-25  3:03 [PATCH] 2.6: joydev is too eager claiming input devices Dan
@ 2003-09-25  3:54 ` Dmitry Torokhov
  2003-09-25  4:31   ` Dan
  2003-09-25  5:12 ` Dmitry Torokhov
  1 sibling, 1 reply; 9+ messages in thread
From: Dmitry Torokhov @ 2003-09-25  3:54 UTC (permalink / raw)
  To: Dan, linux-kernel

On Wednesday 24 September 2003 10:03 pm, Dan wrote:
> This patch seems to have broken my Logitech Wingman Action usb gamepad,
> it shows as connected but isn't claimed by joydev... another joystick I
> have (saitek cyborg usb gold) works fine, and the logitech worked in
> previous 2.5/6.x kernels so I'm guessing this patch is to blame, I'm on
> 2.6.0-test5-mm1, is there any info from the joystick I can provide you
> with to fix it?  I'm not sure where to look, thanks -Dan
>

Could you post contents of your /proc/bus/input/devices please?

Dmitry

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] 2.6: joydev is too eager claiming input devices
  2003-09-25  3:54 ` Dmitry Torokhov
@ 2003-09-25  4:31   ` Dan
  0 siblings, 0 replies; 9+ messages in thread
From: Dan @ 2003-09-25  4:31 UTC (permalink / raw)
  To: Dmitry Torokhov, linux-kernel

On Wed, 2003-09-24 at 23:54, Dmitry Torokhov wrote:
> Could you post contents of your /proc/bus/input/devices please?

Here's the gamepad's section:

I: Bus=0003 Vendor=046d Product=c20b Version=0060
N: Name="Logitech WingMan Action Pad"
P: Phys=usb-0000:02:00.0-1/input0
H: Handlers=
B: EV=b
B: KEY=1ff 1 0 0 0 0 0 0 0 0
B: ABS=30007

-Dan



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] 2.6: joydev is too eager claiming input devices
  2003-09-25  3:03 [PATCH] 2.6: joydev is too eager claiming input devices Dan
  2003-09-25  3:54 ` Dmitry Torokhov
@ 2003-09-25  5:12 ` Dmitry Torokhov
  2003-09-25  6:29   ` Andrew Morton
  1 sibling, 1 reply; 9+ messages in thread
From: Dmitry Torokhov @ 2003-09-25  5:12 UTC (permalink / raw)
  To: Dan, linux-kernel

On Wednesday 24 September 2003 10:03 pm, Dan wrote:
> This patch seems to have broken my Logitech Wingman Action usb gamepad,
> it shows as connected but isn't claimed by joydev... another joystick I
> have (saitek cyborg usb gold) works fine, and the logitech worked in
> previous 2.5/6.x kernels so I'm guessing this patch is to blame, I'm on
> 2.6.0-test5-mm1, is there any info from the joystick I can provide you
> with to fix it?  I'm not sure where to look, thanks -Dan
>

Could you please try the following patch (it is incremental against the 
previous one and should apply to the -mm)

--- 2.6.0-test4/drivers/input/joydev.c	2003-09-25 00:06:52.000000000 -0500
+++ linux-2.6.0-test4/drivers/input/joydev.c	2003-09-25 00:02:17.000000000 -0500
@@ -499,7 +499,28 @@
 		.evbit = { BIT(EV_ABS) },
 		.absbit = { BIT(ABS_RX), BIT(ABS_RY) },
 	}, /* magellan and some others report only MISC buttons but we can identify 
-	      them by using special axis auch as RX/RY, ABS_WHEEL or ABS_THROTTLE */
+	      them by using special axis auch as RX/RY, HATnX/HATnY, ABS_WHEEL or 
+	      ABS_THROTTLE */
+	{
+		.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
+		.evbit = { BIT(EV_ABS) },
+		.absbit = { BIT(ABS_HAT0X), BIT(ABS_HAT0Y) },
+	},
+	{
+		.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
+		.evbit = { BIT(EV_ABS) },
+		.absbit = { BIT(ABS_HAT1X), BIT(ABS_HAT1Y) },
+	},
+	{
+		.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
+		.evbit = { BIT(EV_ABS) },
+		.absbit = { BIT(ABS_HAT2X), BIT(ABS_HAT2Y) },
+	},
+	{
+		.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
+		.evbit = { BIT(EV_ABS) },
+		.absbit = { BIT(ABS_HAT3X), BIT(ABS_HAT3Y) },
+	},
 	{
 		.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
 		.evbit = { BIT(EV_ABS) },

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] 2.6: joydev is too eager claiming input devices
  2003-09-25  5:12 ` Dmitry Torokhov
@ 2003-09-25  6:29   ` Andrew Morton
  2003-10-01  8:10     ` Dan
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Morton @ 2003-09-25  6:29 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: overridex, linux-kernel, Vojtech Pavlik

Dmitry Torokhov <dtor_core@ameritech.net> wrote:
>
> Could you please try the following patch (it is incremental against the 
>  previous one and should apply to the -mm)

I ran that patch[1] past Vojtech yesterday and he then fixed the problem
which it was addressing by other means within his tree.

So what we should do is to ask Vojtech to share that change with us so Dan
can test it, please.


[1] ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.0-test5/2.6.0-test5-mm4/broken-out/joydev-exclusions.patch


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] 2.6: joydev is too eager claiming input devices
  2003-09-25  6:29   ` Andrew Morton
@ 2003-10-01  8:10     ` Dan
  2003-10-01 17:27       ` Vojtech Pavlik
  0 siblings, 1 reply; 9+ messages in thread
From: Dan @ 2003-10-01  8:10 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Dmitry Torokhov, linux-kernel, Vojtech Pavlik

On Thu, 2003-09-25 at 02:29, Andrew Morton wrote:
> Dmitry Torokhov <dtor_core@ameritech.net> wrote:
> >
> > Could you please try the following patch (it is incremental against the 
> >  previous one and should apply to the -mm)
> 
> I ran that patch[1] past Vojtech yesterday and he then fixed the problem
> which it was addressing by other means within his tree.
> 
> So what we should do is to ask Vojtech to share that change with us so Dan
> can test it, please.
> 
> 
> [1] ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.0-test5/2.6.0-test5-mm4/broken-out/joydev-exclusions.patch
> 

Hi again,

I'm using 2.6.0-test6 right now with Dmitry's fix and it works fine,
still waiting for Vojtech's code to test out -Dan



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] 2.6: joydev is too eager claiming input devices
  2003-10-01  8:10     ` Dan
@ 2003-10-01 17:27       ` Vojtech Pavlik
  2003-10-02  1:51         ` Dan
  0 siblings, 1 reply; 9+ messages in thread
From: Vojtech Pavlik @ 2003-10-01 17:27 UTC (permalink / raw)
  To: Dan; +Cc: Andrew Morton, Dmitry Torokhov, linux-kernel, Vojtech Pavlik

On Wed, Oct 01, 2003 at 04:10:29AM -0400, Dan wrote:
> On Thu, 2003-09-25 at 02:29, Andrew Morton wrote:
> > Dmitry Torokhov <dtor_core@ameritech.net> wrote:
> > >
> > > Could you please try the following patch (it is incremental against the 
> > >  previous one and should apply to the -mm)
> > 
> > I ran that patch[1] past Vojtech yesterday and he then fixed the problem
> > which it was addressing by other means within his tree.
> > 
> > So what we should do is to ask Vojtech to share that change with us so Dan
> > can test it, please.
> > 
> > 
> > [1] ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.0-test5/2.6.0-test5-mm4/broken-out/joydev-exclusions.patch
> > 
> 
> Hi again,
> 
> I'm using 2.6.0-test6 right now with Dmitry's fix and it works fine,
> still waiting for Vojtech's code to test out -Dan

It's in test6. Does test6 work fine without Dmitry's fix?

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] 2.6: joydev is too eager claiming input devices
  2003-10-01 17:27       ` Vojtech Pavlik
@ 2003-10-02  1:51         ` Dan
  0 siblings, 0 replies; 9+ messages in thread
From: Dan @ 2003-10-02  1:51 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Andrew Morton, Dmitry Torokhov, linux-kernel

On Wed, 2003-10-01 at 13:27, Vojtech Pavlik wrote:
> It's in test6. Does test6 work fine without Dmitry's fix?

Yep, seems to work fine without it. -Dan



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] 2.6: joydev is too eager claiming input devices
@ 2003-09-03  5:50 Dmitry Torokhov
  0 siblings, 0 replies; 9+ messages in thread
From: Dmitry Torokhov @ 2003-09-03  5:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: Vojtech Pavlik, David Cougle

Currently joydev will claim any device reporting ABS_X events. This 
includes Synaptics touchpad in absolute mode, PC110 touchpad and both 
touchscreens. Nothing bad happens except for strange input/jsX device 
but it's still not right.

I think we need stricter rules for joydev matching, like in the patch
below. Unfortunately I do not own any joysticks, but I did go through
all code in input/joystick and I think I covered all possible cases.

Dmitry

--- 2.6.0-test4/drivers/input/joydev.c	2003-09-03 00:43:19.000000000 -0500
+++ linux-2.6.0-test4/drivers/input/joydev.c	2003-09-03 00:44:00.000000000 -0500
@@ -466,13 +466,43 @@
 
 static struct input_device_id joydev_ids[] = {
 	{
-		.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
+		.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT |
+			 INPUT_DEVICE_ID_MATCH_BUS,
+		.evbit = { BIT(EV_ABS) },
+		.absbit = { BIT(ABS_X) },
+		.id = { .bustype = BUS_GAMEPORT },
+	}, /* anything connected to a gameport is a fair game */
+	{
+		.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT |
+			 INPUT_DEVICE_ID_MATCH_BUS,
+		.evbit = { BIT(EV_ABS) },
+		.absbit = { BIT(ABS_X) },
+		.id = { .bustype = BUS_AMIGA },
+	}, /* amiga joystick does not report any special buttons but luckily it is 
+	      the only device rporting absolute coordinates on Amiga bus */
+	{
+		.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT | 
+			 INPUT_DEVICE_ID_MATCH_KEYBIT,
 		.evbit = { BIT(EV_ABS) },
 		.absbit = { BIT(ABS_X) },
+		.keybit = { BIT(BTN_TRIGGER) }, 
+	}, /* most joysticks have either BTN_TRIGGER or BTN_A or both */
+	{
+		.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT | 
+			 INPUT_DEVICE_ID_MATCH_KEYBIT,
+		.evbit = { BIT(EV_ABS) },
+		.absbit = { BIT(ABS_X) },
+		.keybit = { BIT(BTN_A) },
 	},
 	{
 		.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
 		.evbit = { BIT(EV_ABS) },
+		.absbit = { BIT(ABS_RX), BIT(ABS_RY) },
+	}, /* magellan and some others report only MISC buttons but we can identify 
+	      them by using special axis auch as RX/RY, ABS_WHEEL or ABS_THROTTLE */
+	{
+		.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
+		.evbit = { BIT(EV_ABS) },
 		.absbit = { BIT(ABS_WHEEL) },
 	},
 	{

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-10-02  1:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-25  3:03 [PATCH] 2.6: joydev is too eager claiming input devices Dan
2003-09-25  3:54 ` Dmitry Torokhov
2003-09-25  4:31   ` Dan
2003-09-25  5:12 ` Dmitry Torokhov
2003-09-25  6:29   ` Andrew Morton
2003-10-01  8:10     ` Dan
2003-10-01 17:27       ` Vojtech Pavlik
2003-10-02  1:51         ` Dan
  -- strict thread matches above, loose matches on Subject: below --
2003-09-03  5:50 Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).