linux-image-2.6.20-15 fails to properly detect and configure EMS USB-II

Bug #106622 reported by Paul Zaremba
20
Affects Status Importance Assigned to Milestone
Linux
Fix Released
Undecided
Unassigned
linux-source-2.6.20 (Ubuntu)
Fix Released
Undecided
Ubuntu Kernel USB Team

Bug Description

Binary package hint: linux-image-2.6.20-15-generic

I have a PS2 to USB converter (the EMS USBII) that has two ports on it.
Older kernel revisions (2.6.15 is the last one it worked on, I think) reported the adapter as
a single 8 axis 32 button controller. This was fine for emulators.

2.6.20-15 reports the controller as a 4 axis, 16 button controller.. and muxes the two ports together. This makes the device useless with the current code base.

I spent the day today poring over the input device source code and found a place in usb/input/hid-core.c that specified quirks. I added the "multi input" quirk for my device, recompiled the module and tested the module in my stock kernel.

With the patch the device now detects as two 4 axis 16 port controllers (js0 and js1 for me).

I tested using the KDE device panel. I confirmed that the channels are separated from eachother.

I know that the Ubuntu kernel is patched against the standard kernel so I'm submitting the patch here first in the hopes it will be distributed quickly. I'm in the process of downloading the stock kernel and sending the same (or a similar) patch to the mainstream kernel team.

I will attach the patch in a moment.

Revision history for this message
Paul Zaremba (pez-launchpad) wrote :
Revision history for this message
Marco Rodrigues (gothicx) wrote :

I send it to Linus Torvalds, so let's wait for a answer =)

Revision history for this message
Paul Zaremba (pez-launchpad) wrote :

Thanks Marco.

I was just going through the formatting for mailing the maintainer when I realized that I violated the constraints of the table comment (alphabetically sorted). I expect the patch to be rejected on the first pass for that if he doesn't want to take the time to fix it. :-)

I'll wait to see if he has any other comments (like maybe shorten my #define name or pull everything onto one line) before I make a 'final' patch.

Revision history for this message
Marco Rodrigues (gothicx) wrote :

Jiri Kosina answer:

HID_QUIRK_MULTI_INPUT is intended to handle devices which provide multiple different input reports on the same interface, which apparently is a case with 0x0b43/0x0003 device you have (I guess the device provides only one iterface, which it uses to send both input reports, right?). If so, the patch is appropriate.

Could you please send me the patch with proper metadata (a short changelog description and a Signed-off-by line), so that I can queue it in a hid tree?

Changed in linux-source-2.6.20:
status: Unconfirmed → Confirmed
Revision history for this message
Paul Zaremba (pez-launchpad) wrote :

Yes, I'll put my element into the list into the proper place as per the array comment, re create the patch and then send it with the format described on the kernel web site.

Revision history for this message
Marco Rodrigues (gothicx) wrote :

Send it to e-mail: <email address hidden> (Jiri Kosina)

Revision history for this message
Paul Zaremba (pez-launchpad) wrote :

I've sent in the patch. Jiri Kosina said he'll add a corrected version (to merge with other changes) of the patch above into 2.6.22. In the meantime I'll use this patch in my local copy.

Revision history for this message
Marco Rodrigues (gothicx) wrote :

Nice.. how about to attach here the patch you sent to Jiri ? So Ubuntu Kernel Team can merge it...

Changed in linux-source-2.6.20:
status: Confirmed → In Progress
Changed in linux-source-2.6.20:
assignee: nobody → ben-collins
status: In Progress → Confirmed
assignee: ben-collins → nobody
Revision history for this message
Paul Zaremba (pez-launchpad) wrote :

Here is the one that is close to what Jiri will submit.

The only differences between it and the one above is that there's only one line for the entry in the table and the table is in its sorted position. I submitted one to Jiri with an additional quirk (NO_GET) but he corrected my view of what that quirk was for. This one has MULTI_INPUT only. I've been playing epsxe and zsnes all afternoon ( for testing purposes ;-) ) and haven't noticed any problems.

It will apply with -p1 from a root source directory.

To be clear: Jiri is not going to apply my patch directly. He's going to take the changes and merge them by hand because he's changed other things in the same file.

Changed in linux:
status: Unconfirmed → Confirmed
Changed in linux:
status: Confirmed → Fix Committed
Revision history for this message
Marco Rodrigues (gothicx) wrote :

Jiri Kosina: I have already applied the fix to support HID_QUIRK_MULTI_INPUT for this device into my git patch queue, and it is scheduled for merge with Linus for 2.6.22 merge window.

Revision history for this message
Marco Rodrigues (gothicx) wrote :
Changed in linux:
status: Fix Committed → Fix Released
Changed in linux-source-2.6.20:
assignee: nobody → ubuntu-kernel-usb
Revision history for this message
Marco Rodrigues (gothicx) wrote :

Fixed on Gutsy...

Changed in linux-source-2.6.20:
status: Confirmed → Fix Released
Revision history for this message
Stuart (shoeberto) wrote :

Is there any chance of there being a patch making it into a kernel for a release before Gutsy? My luck with patching it against the kernel sources was limited, so maybe I was just missing something.

Revision history for this message
Marco Rodrigues (gothicx) wrote :

Have you tried Gutsy ? It's fixed on 2.6.21 I think.. Gutsy wil have v2.6.22 with a lot of patches :-)

Revision history for this message
Stuart (shoeberto) wrote :

Are there any big problems with the current release? I don't really want to upgrade to fix this one problem if it's going to break all my programs, drivers, etc.

Revision history for this message
Marco Rodrigues (gothicx) wrote : Re: [Bug 106622] Re: linux-image-2.6.20-15 fails to properly detect and configure EMS USB-II

It's too soon to upgrade to Gutsy, you need to wait or request a patch to ubuntu
kernel team :-)

Stuart wrote:
> Are there any big problems with the current release? I don't really
> want to upgrade to fix this one problem if it's going to break all my
> programs, drivers, etc.
>

--
Marco Rodrigues

http://Marco.Tondela.org

Revision history for this message
Scott Ritchie (scottritchie) wrote :

I have a suspicion that this bug crept back into Gutsy. My EMS adaptor is completely nonfunctional, and coming up as two 4-axis, 16 button joysticks.

I have an EMS adaptor

dmesg reports this:
[ 33.878257] input: HID 0b43:0003 as /class/input/input2
[ 33.878292] input: HID 0b43:0003 as /class/input/input3
[ 33.878321] input: HID 0b43:0003 as /class/input/input4
[ 33.878347] input: HID 0b43:0003 as /class/input/input5
[ 33.878350] input: USB HID v1.00 Joystick [HID 0b43:0003] on usb-0000:00:02.0-4
[ 34.408619] input: HID 062a:0000 as /class/input/input6
[ 40.838496] usbcore: registered new interface driver xpad
[ 40.838503] /build/buildd/linux-source-2.6.22-2.6.22/drivers/input/joystick/xpad.c: driver for Xbox controllers v0.1.6

Stepmania reports this:
Found 2 joysticks
   0: 'HID 0b43:0003' axes: 4, hats: 0, buttons: 16
   1: 'HID 0b43:0003' axes: 4, hats: 0, buttons: 16

The last two lines are almost certainly a bug - xpad shouldn't be being called here, as I don't have an Xbox controller. I get the same behavior whether I plug in one PS2 controller, or a PS2 controller and a dance pad, or two dance pads.

The behavior I see (with either jstest or stepmania) is that ALL buttons appear to be constantly pressed, or constantly off. Input has no effect. Doing rmmod xpad also doesn't seem to change anything.

Revision history for this message
jtolds (jtolds) wrote :

I have an EMS adaptor with 1 original playstation controller attached on a pretty basic Gutsy install and it works just fine.
Occasionally I have to disconnect the adapter and reconnect it if /dev/input/js0 doesn't exist, but that's pretty rare.

Revision history for this message
jtolds (jtolds) wrote :

Sorry to post twice, but just for more clarity, my dmesg output reports that the xpad module is registered as well.

[ 17.964000] usbcore: registered new interface driver hiddev
[ 17.976000] input: Logitech USB Optical Mouse as /class/input/input3
[ 17.976000] input: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-00
00:00:1a.1-1
[ 18.028000] input: HID 0b43:0003 as /class/input/input4
[ 18.028000] input: HID 0b43:0003 as /class/input/input5
[ 18.028000] input: HID 0b43:0003 as /class/input/input6
[ 18.028000] input: HID 0b43:0003 as /class/input/input7
[ 18.028000] input: USB HID v1.00 Joystick [HID 0b43:0003] on usb-0000:00:1a.1
-2
[ 18.028000] usbcore: registered new interface driver usbhid
[ 18.028000] /build/buildd/linux-source-2.6.22-2.6.22/drivers/hid/usbhid/hid-c
ore.c: v2.6:USB HID core driver
[ 18.192000] usbcore: registered new interface driver xpad
[ 18.192000] /build/buildd/linux-source-2.6.22-2.6.22/drivers/input/joystick/xpad.c: driver for Xbox controllers v0.1.6

Again, /dev/input/js0 and /dev/input/js1 work as my Playstation ports.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.