Hi,

I have a Saitek P750 game controller which doesn't work on my
Linux box, running a 2.4.2 kernel and one of the UHCI drivers
(I have tried the standard and the alternate one with the same
results.)  Other USB gamepads I've tried work fine in this
configuration, and the P750 seems to work fine under Windows
98.

This is the output from /proc/bus/usb/devices when the gamepad 
is connected:

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=fa00
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  6 Spd=1.5 MxCh= 0
D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=06a3 ProdID=052d Rev= 0.02
S:  Manufacturer=Saitek
S:  Product=Saitek P750
S:  SerialNumber=00000112
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 20mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=hid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl= 12ms

The symptoms, when running jstest, is that I just don't get any
events at all, except for the startup events (which I believe
are generated internally by the driver.)

If I turn on DEBUG and DEBUG_DATA in hid.c, I get diagnostics like
this:

  hid.c: report (size 8) (unnumbered) =  52 80 0a bc ff 00 00 00
  hid.c: report 0 is too short, (8 < 11)
  hid.c: report (size 3) (unnumbered) =  08 00 00
  hid.c: report 0 is too short, (3 < 11)

The problem appears to be that the HID layer gets the 11-byte
report as two separate reports: one 8-byte report and one
3-byte report, neither of which makes sense to the hid.c which
discards them.  Merging them (with an ugly exeprimental hack)
gives me correct events with all buttons and axis working as
they should.

Since it is a low-speed device, packets are limited to 8 bytes,
so I believe it's correct to send an 11-byte report as one
8-byte packet followed by a 3-byte packet.  At least, the HID
specification (v1.1) seems to allow it.  From section 8.4, page
56:

  A report might span one or more USB transactions. For
  example, an application that has 10-byte reports will span at
  least two USB transactions in a low-speed device.

Also, the report size 11 is consistent with the HID Class
Report Descriptor, which has components summing up to
12+12+8+24+12+16+4=88 bits.

Is this case supposed to be handled in the current
implementation?  Does it work for anyone/everyone else?  It
seems to me that the amount of data that can be delivered to
hid_irq() is explicitly limited to the maximum packet size (8
bytes) in usb_hid_configure():

   maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
   FILL_INT_URB(&hid->urb, dev, pipe, hid->buffer, 
                maxp > 32 ? 32 : maxp, hid_irq, 
                hid, endpoint->bInterval);

So I can't really see how the HID layer could get larger
reports than the maximum packet size, yet that seems to be
allowed by the specification...

-- 
Rickard Westman              |  Tel: +46 (0)13 461 1323
Linux Software Engineer      |  GSM: +46 (0)70 914 6857
Media Terminals              |  Fax: +46 (0)13 461 1893
Nokia Home Communications    |  Email: [EMAIL PROTECTED]

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to