Bug 37075 - the iforce joystick driver is broken (it does not report any event)
the iforce joystick driver is broken (it does not report any event)
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Pete Zaitcev
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2001-04-22 13:03 EDT by Alfredo Ferrari
Modified: 2007-04-18 12:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-04-22 13:06:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alfredo Ferrari 2001-04-22 13:03:55 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.2.16-3smp i686)

The iforce joystick driver in RH7.1 is broken. This is a well known problem
already discussed (and solved) a couple of months ago in the USB lists, I
am puzzled RH missed it. The driver does not report any event at all after
initializing due to a missing 
      iforce->usbdev = dev;
assignment. I include below the e-mails I got from Randy Dunlap, the
second one could suggest that similar problems could be there with other
input drivers. By the way there is bug in the hotplug stuff,
it correctly loads iforce.o when the joystick is plugged in but it does not
load joydev as well ==> it cannot be used unless I manually issue "modprobe
joydev" as well

Date: Fri, 16 Feb 2001 11:52:53 -0800
From: Randy.Dunlap <randy.dunlap@intel.com>
To: Alfredo Ferrari <Alfredo.Ferrari@cern.ch>
Cc: "'linux-usb-devel@lists.sourceforge.net'"
Subject: Re: [linux-usb-devel] Problems with USB and a Logitech Wingman
    Force  under kernel 2.4.0
   1 Shown    32 lines  Text
   2 Shown    10 lines  Text


Please try the attached iforce.c patch on 2.4.x and
let us know if it works/helps.


Alfredo Ferrari wrote:
> On Wed, 14 Feb 2001, Dunlap, Randy wrote:
> Hi Randy
> I performed the checks you suggested. Enclosed please find:
> c) iforce-messages.log, messages on the logs when the joystick is
>    accessed with some extra printing including those suggested by you.
>    The error code from usb_submit_urb is -19 as you can see. The
> messages
>    are exactly the same with uhci or usb-uhci, so I include them only
> once
> d) usbdevices-2.2.log, /proc/bus/usb/devices content with
>    kernel-2.2.17 and the uhci driver (backport to 2.2 as included in the
>    latest RH7 update). As I told you, the joystick works fine under
> these conditions
> > Hi,
> >
> > > I already reported this problem a couple of days before but I got no
> > > answer and/or suggestion. I have a Logitech Wingman Force
> > > joystick which
> > > works nicely under 2.2 kernels with the wmforce modules. It
> > > is recognized and properly configured.
    [ Part 2: "Attached Text" ]

--- linux/drivers/char/joystick/iforce.c.org    Thu Jan  4 13:15:32 2001
+++ linux/drivers/char/joystick/iforce.c        Fri Feb 16 11:46:41 2001
@@ -196,6 +196,7 @@
        iforce->dev.idvendor = dev->descriptor.idVendor;
        iforce->dev.idproduct = dev->descriptor.idProduct;
        iforce->dev.idversion = dev->descriptor.bcdDevice;
+       iforce->usbdev = dev;
        FILL_INT_URB(&iforce->irq, dev, usb_rcvintpipe(dev,
                        iforce->data, 8, iforce_usb_irq, iforce,

Date: Sun, 18 Feb 2001 10:27:51 -0800
From: "Dunlap, Randy" <randy.dunlap@intel.com>
To: 'Alfredo Ferrari' <Alfredo.Ferrari@cern.ch>
Cc: "'linux-usb-devel@lists.sourceforge.net'"
Subject: RE: [linux-usb-devel] Problems with USB and a Logitech Wingman Fo
    rce under kernel 2.4.0

> From: Alfredo Ferrari [mailto:alfredo.ferrari@cern.ch]
> of course you are right! With that extra line it works. By the way, I
> don't understand how it could ever work without...
> What's next? Do I have to send a message to the driver 
> mantainer (Vojtech
> Pavlik I assume), or you already sent him the pacth?

Hi Alfredo-
After I sent that 1-line patch to you, I found that
and several other patches in Vojtech's "input" subsystem
CVS, so I don't think that he needs it, although the
kernel source code does need it.

That code could have worked once upon a time, before we
added setting usbdev = NULL in completion routines and
"urb.usbdev = dev" before any/all calls to usb_submit_urb().


Reproducible: Always
Steps to Reproduce:
1.Plug in a Logitech usb joystick or similar
2.Run a testing program (ie jstest) after inserting all relevant modules
3.Move/press buttons 

Actual Results:  No event is reported

Expected Results:  The events should be reported
Comment 1 Pete Zaitcev 2001-04-23 01:10:42 EDT
Thanks for the bug report that allowed me to fix
the problem without having the hardware. If only
every bug submitter worked like that!

The bug is real, though Randy's explanation is not
complete. When we started to zap urb->dev, many
assignments needed assignments added there before
a repeated submit_urb(). Here a kind soul added
that assignment, but used an unutialized variable
for that. The iforce->usbdev is it.

The fix will come up in the next errata
(actually, first errata for 7.1)

Thanks again,
-- Pete

Note You need to log in before you can comment on or make changes to this bug.