On 20/10/13(Sun) 12:09, Jeremy Evans wrote: > On 10/20 03:52, Martin Pieuchot wrote: > > [...] > > Thanks for responding. Here's a new diff that incorporates most of your > suggestions. Unfortunately, using the existing quirks infrastructure > doesn't work correctly, because the quirks API is based on device > manufacturer and vendor, and matching on that instead of interface > subclass and protocol appears to not work correctly. When you plug in > the controller with my original diff and the first diff below, you get: > > uhidev0 at uhub3 port 3 configuration 1 interface 0 "\M-)Microsoft > Corporation Controller" rev 2.00/1.10 addr 2 > uhidev0: iclass 255/93 > uhid0 at uhidev0: input=20, output=0, feature=0 > ugen0 at uhub3 port 3 configuration 1 "\M-)Microsoft Corporation Controller" > rev 2.00/1.10 addr 2 > > As you can see, the controller shows up as both a uhid and a ugen. > > With the second diff below, when you plugin the controller, it > attaches as follows: > > uhidev0 at uhub3 port 3 configuration 1 interface 0 "\M-)Microsoft > Corporation Controller" rev 2.00/1.10 addr 2 > uhidev0: iclass 255/93 > uhid0 at uhidev0: input=20, output=0, feature=0 > uhidev1 at uhub3 port 3 configuration 1 interface 1 "\M-)Microsoft > Corporation Controller" rev 2.00/1.10 addr 2 > uhidev1: iclass 255/93 > uhid1 at uhidev1: input=20, output=0, feature=0 > uhidev2 at uhub3 port 3 configuration 1 interface 2 "\M-)Microsoft > Corporation Controller" rev 2.00/1.10 addr 2 > uhidev2: iclass 255/93 > uhid2 at uhidev2: input=20, output=0, feature=0 > uhidev3 at uhub3 port 3 configuration 1 interface 3 "\M-)Microsoft > Corporation Controller" rev 2.00/1.10 addr 2 > uhidev3: no input interrupt endpoint > > In this case uhid0 appears to work, but uhid1 and uhid2 do not: > > $ usbhidctl -f 1 -a > usbhidctl: USB_GET_REPORT (probably not supported by device): Input/output > error > > Anyway, let me know what you think about the first diff, or if I'm doing > something wrong with the second diff that is causing it to attach > multiple times.
You're not doing anything wrong, it's just that your device has more than one interface. In your previous diff you matched only the first interface and now you match any interface of the device. Could you send me the output of "lsusb -v" for your device? (lsusb(1) is in the usbutils package). M.