Re: [PATCH] HID: sony: disable descriptor fixup for FutureMax Dance Mat

From: Antonio Ospite
Date: Thu Jul 21 2016 - 12:53:51 EST


On Tue, 19 Jul 2016 09:08:27 +0300
Mikko Perttunen <mikko.perttunen@xxxxxxxx> wrote:

> On 07/18/16 17:28, Benjamin Tissoires wrote:
[...]
> >
> > Also, I think it would be better to have a check on the existing report
> > descriptor instead of blindly fixing it. Other drivers make sure they
> > are fixing the correct region before overriding it, but I think using a
> > md5sum might be just easier (though that's not required for your patch I
> > think).
>
> I agree. In fact, the mat used to work back in 3.15 when the driver did
> some rudimentary checks before overwriting the descriptor. In any case,
> it would be difficult for me to add the checks since the mat is the only
> piece of hardware I own that is handled by this driver.
>

The fact that the report gets fixed up unconditionally is from
commit c607fb8 (HID: sony: Always override the Sixaxis descriptor).

The rationale behind this change was that compatible devices are
supposed to send exactly the same _raw_ data as the original ones, so
overriding the _whole_ descriptor unconditionally should keep them
working.

I would be interesting to understand why some (supposedly) compatible
devices break, maybe they rely on the fact that the PS3 would use the
original report?

BTW I'd slightly prefer the current way of having a straight path for
the common case (original and actually compatible devices) and handle
the exceptions explicitly using quirks, but I am open to changes and I
can test patches with some original controllers if needed.

Ciao ciao,
Antonio

--
Antonio Ospite
http://ao2.it

A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?