linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cameron Gutman <aicommander@gmail.com>
To: Swyter <swyterzone@gmail.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org,
	Benjamin Valentin <benpicco@zedat.fu-berlin.de>
Subject: Re: [PATCH] Input: xpad: Remove a conflicting Razer Sabertooth using the VID/PID for the Razer DeathAdder 2013 mouse
Date: Sun, 2 Aug 2020 15:50:20 -0700	[thread overview]
Message-ID: <f4f0fa65-3950-249e-c183-4dd632326c91@gmail.com> (raw)
In-Reply-To: <a6fd180e-a915-1eef-5d8d-8e260cb3c709@gmail.com>

On 7/30/20 11:14 PM, Swyter wrote:
> On 31/07/2020 7:54, Cameron Gutman wrote:
>> On 7/30/20 8:44 AM, Ismael Ferreras Morezuelas wrote:
>>> -	{ 0x1532, 0x0037, "Razer Sabertooth", 0, XTYPE_XBOX360 },
>>>
>>
>> The list here doesn't actually affect which devices that xpad will attach to.
>> xpad_table[] is what determines the devices that xpad's probe() will be
>> called for. It does this using the VID + vendor-defined interface subclass
>> and interface number, not the VID+PID combos. xpad_device[] just provides a
>> friendly name and quirk flags for some supported gamepads. Gamepads that
>> aren't in the list will just show up as "Generic X-Box pad" with no quirk
>> flags applied.
>>
>> If 1532:0037 is actually a mouse, it's unlikely we'd even reach the probe()
>> in the first place. The device would lack the expected vendor-defined Xbox
>> interface that is required for xpad to attach to the device.
>>
>> All that said, I'm definitely not opposed to removing the entry if it isn't
>> a real gamepad. Given the difficulty you had finding information about this
>> device, I take it you don't have any 'lsusb -v' output for this device, right?
>>
>> Regards,
>> Cameron
>>
> 
> Hi, Cameron. Yeah, the main idea is to clean the list, even if as you say it hasn't
> caused mouse issues and that's why probably nobody has noticed it before.
> 
> Because, for some reason, everyone assumes some kind of correctness even when most of
> these are community-sourced and self-reported, everyone copies these lists from
> somewhere else. Hopefully the fixes will trickle downstream.
> 
> So yeah, I know for sure that (for example) the internal list Valve uses comes right from here:
> https://hg.libsdl.org/SDL/file/7d94464f10f7/src/joystick/controller_type.h#l246
> 
> (It's commented out)
> 
> Actual change referencing this kernel issue:
> https://hg.libsdl.org/SDL/rev/29809f6f0271
> 
> For more information of the device, take a look here:
> https://github.com/xboxdrv/xboxdrv/pull/59
> 
> You can see a lsusb dump here: https://github.com/xboxdrv/xboxdrv/files/76581/Qa6dBcrv.txt
> 
> So yeah, let me know what you guys think. This has been a weird tangent for me. :)
> 

Yep, that device definitely isn't an Xbox controller. That's for sure.

We wouldn't reach xpad_probe(), but it's a good idea to get rid of it anyway
to ensure that other projects using the our list won't be misled like SDL was.

On the off chance Razer did release an Xbox gamepad with that VID/PID, we'll
still enumerate it properly in xpad using the generic controller codepath.

So this patch looks good to me.

Reviewed-by: Cameron Gutman <aicommander@gmail.com>


Regards,
Cameron


      reply	other threads:[~2020-08-02 22:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30 15:44 [PATCH] Input: xpad: Remove a conflicting Razer Sabertooth using the VID/PID for the Razer DeathAdder 2013 mouse Ismael Ferreras Morezuelas
2020-07-31  5:54 ` Cameron Gutman
2020-07-31  6:14   ` Swyter
2020-08-02 22:50     ` Cameron Gutman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f4f0fa65-3950-249e-c183-4dd632326c91@gmail.com \
    --to=aicommander@gmail.com \
    --cc=benpicco@zedat.fu-berlin.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=swyterzone@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).