linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cameron Gutman <aicommander@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	LuK1337 <priv.luk@gmail.com>, Mark Furneaux <mark@furneaux.ca>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Richard Fontana <rfontana@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Allison Randal <allison@lohutok.net>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: xpad - Update xboxone fw2015 init packet
Date: Mon, 20 Apr 2020 21:56:56 -0700	[thread overview]
Message-ID: <436c79ed-ca21-c075-e2da-0934da5000a2@gmail.com> (raw)
In-Reply-To: <20200419180136.GK166864@dtor-ws>

On 4/19/20 11:01 AM, Dmitry Torokhov wrote:
> On Sun, Apr 19, 2020 at 09:46:23AM +0200, LuK1337 wrote:
>> From: Łukasz Patron <priv.luk@gmail.com>
>>
>> Appending { 0x05, 0x20, 0x02, 0x0f, 0x06 } to
>> xboxone_fw2015_init fixes an issue where the
>> controller is somewhat stuck in bluetooth
>> mode until you plug it into Windows PC.
>>
>> Signed-off-by: Łukasz Patron <priv.luk@gmail.com>
> 
> Thank you Łukasz. Could you please tell me what device(s) have you
> observed the issue with? I am a bit worried if this may interfere with
> other devices that currently work fine with the driver. Cameron, Mark,
> do you have any concerns here?
> 

Yes, I gave it a try here, and it looks like there's definitely some
breakages for non-updated controllers. It breaks the Covert Forces
edition Xbox One controller (0x045e, 0x02dd) and also another non-upgraded
Xbox One S controller of the same model as the affected controller
(0x045e, 0x02ea, firmware 3.1.1221.0).

On the plus side, it _does_ seem to fix the issue.

>> ---
>>  drivers/input/joystick/xpad.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
>> index 6b40a1c68f9f..894fa81f717a 100644
>> --- a/drivers/input/joystick/xpad.c
>> +++ b/drivers/input/joystick/xpad.c
>> @@ -455,7 +455,8 @@ struct xboxone_init_packet {
>>   * or later firmware installed (or present from the factory).
>>   */
>>  static const u8 xboxone_fw2015_init[] = {
>> -	0x05, 0x20, 0x00, 0x01, 0x00
>> +	0x05, 0x20, 0x00, 0x01, 0x00,
>> +	0x05, 0x20, 0x02, 0x0f, 0x06
>>  };

One thing that strikes me as odd about this init packet is that it looks
like 2 packets strung together. Most of the other init packets have 0x20
as their second byte, and there's even something resembling a sequence
number in the third byte (0x02). Maybe these are supposed to be separate
init packets?

Hopefully we can find some init sequence that at least the One S controller
can tolerate on all known firmware versions. If not, the firmware rev is
available to us in bcdDevice, but I'd only like to use an explicit version
check as a last resort.

>>  /*
>> -- 
>> 2.26.0
>>
> 
> Thanks.
> 

Regards,
Cameron

  parent reply	other threads:[~2020-04-21  4:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-15 18:59 [PATCH] Input: xpad - Update xboxone fw2015 init packet LuK1337
2020-04-19  4:16 ` Dmitry Torokhov
2020-04-19  7:46   ` LuK1337
2020-04-19 18:01     ` Dmitry Torokhov
     [not found]       ` <CAJmEJMzzFO1G=iQy=EfwQ89iWMjpcpupBjBkG29aigqYsc36bA@mail.gmail.com>
2020-04-19 18:22         ` LuK1337
2020-04-21  4:56       ` Cameron Gutman [this message]
2020-04-21  9:24         ` [PATCH] Input: xpad - Add custom init packet for Xbox One S controllers LuK1337
2020-04-21 18:08           ` Dmitry Torokhov
2020-04-22  0:54             ` Cameron Gutman
2020-04-22  7:45               ` LuK1337
2020-04-22  7:46               ` LuK1337
2020-04-22  7:52               ` LuK1337
2020-04-22 17:20                 ` Cameron Gutman
2020-04-22 21:13                   ` Dmitry Torokhov

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=436c79ed-ca21-c075-e2da-0934da5000a2@gmail.com \
    --to=aicommander@gmail.com \
    --cc=allison@lohutok.net \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark@furneaux.ca \
    --cc=priv.luk@gmail.com \
    --cc=rfontana@redhat.com \
    --cc=tglx@linutronix.de \
    /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).