On Thu, Dec 06, 2018 at 07:09:06PM +0100, Benjamin Tissoires wrote: > On Thu, Dec 6, 2018 at 5:59 PM Nic Soudée <nsoudee@xxxxxxxxx> wrote: > > > > SNES RetroPort and RetroPad register only 4 gamepad buttons > > when they should register all 8 buttons. This is described here: > > > > https://ask.fedoraproject.org/en/question/128102 > > > > This is happening because of: > > > > Commit 190d7f02ce8e ("HID: input: do not increment usages when > > duplicate is found") > > > > Here, I add the quirk HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE > > (created for backward compatibility with the change in 190d7f02ce8e) > > for the two products. > > > > Tested with both RetroPort and RetroPad. > > Hi Nic, > > Thanks for the patch. It looks good but I might need a couple of days > before I am able to apply it. > > While I try to put my system back on its feet, can you provide me the > hid-recorder[1] outputs of these 2 devices? > > I just want to be sure that there is not something I overlooked in the > mentioned patch and that a generic solution should not be used. > > Cheers, > Benjamin > > [1] http://bentiss.github.io/hid-replay-docs/ > Hi Benjamin, Here are the outputs from hid-recorder: RetroPad: D: 0 R: 74 05 01 09 05 a1 01 09 01 a1 00 09 30 09 31 15 00 26 ff 00 35 00 46 ff 00 75 08 95 02 81 02 c0 05 09 19 01 29 04 15 00 25 01 75 01 95 04 81 02 75 01 95 04 81 03 19 01 29 04 15 00 25 01 75 01 95 04 81 02 75 01 95 04 81 03 c0 N: RetroUSB.com RetroPad P: usb-0000:00:1d.0-1.1/input0 I: 3 f000 0003 RetroPort: D: 0 R: 74 05 01 09 05 a1 01 09 01 a1 00 09 30 09 31 15 00 26 ff 00 35 00 46 ff 00 75 08 95 02 81 02 c0 05 09 19 01 29 04 15 00 25 01 75 01 95 04 81 02 75 01 95 04 81 03 19 01 29 04 15 00 25 01 75 01 95 04 81 02 75 01 95 04 81 03 c0 N: RetroUSB.com SNES RetroPort P: usb-0000:00:1d.0-1.4.1/input0 I: 3 f000 00f1 Thanks, Nic > > > > Signed-off-by: Nic Soudée <nsoudee@xxxxxxxxx> > > --- > > drivers/hid/hid-ids.h | 4 ++++ > > drivers/hid/hid-quirks.c | 2 ++ > > 2 files changed, 6 insertions(+) > > > > diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h > > index f63489c882bb..ba2f97fd54e5 100644 > > --- a/drivers/hid/hid-ids.h > > +++ b/drivers/hid/hid-ids.h > > @@ -933,6 +933,10 @@ > > #define USB_VENDOR_ID_REALTEK 0x0bda > > #define USB_DEVICE_ID_REALTEK_READER 0x0152 > > > > +#define USB_VENDOR_ID_RETROUSB 0xf000 > > +#define USB_DEVICE_ID_RETROUSB_SNES_RETROPAD 0x0003 > > +#define USB_DEVICE_ID_RETROUSB_SNES_RETROPORT 0x00f1 > > + > > #define USB_VENDOR_ID_ROCCAT 0x1e7d > > #define USB_DEVICE_ID_ROCCAT_ARVO 0x30d4 > > #define USB_DEVICE_ID_ROCCAT_ISKU 0x319c > > diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c > > index 52c3b01917e7..a38f3e08efed 100644 > > --- a/drivers/hid/hid-quirks.c > > +++ b/drivers/hid/hid-quirks.c > > @@ -135,6 +135,8 @@ static const struct hid_device_id hid_quirks[] = { > > { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3003), HID_QUIRK_NOGET }, > > { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3008), HID_QUIRK_NOGET }, > > { HID_USB_DEVICE(USB_VENDOR_ID_REALTEK, USB_DEVICE_ID_REALTEK_READER), HID_QUIRK_NO_INIT_REPORTS }, > > + { HID_USB_DEVICE(USB_VENDOR_ID_RETROUSB, USB_DEVICE_ID_RETROUSB_SNES_RETROPAD), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE }, > > + { HID_USB_DEVICE(USB_VENDOR_ID_RETROUSB, USB_DEVICE_ID_RETROUSB_SNES_RETROPORT), HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE }, > > { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RUMBLEPAD), HID_QUIRK_BADPAD }, > > { HID_USB_DEVICE(USB_VENDOR_ID_SEMICO, USB_DEVICE_ID_SEMICO_USB_KEYKOARD2), HID_QUIRK_NO_INIT_REPORTS }, > > { HID_USB_DEVICE(USB_VENDOR_ID_SEMICO, USB_DEVICE_ID_SEMICO_USB_KEYKOARD), HID_QUIRK_NO_INIT_REPORTS }, > > -- > > 2.19.2 > > > >