* [PATCH] Input: xpad - Update xboxone fw2015 init packet @ 2020-04-15 18:59 LuK1337 2020-04-19 4:16 ` Dmitry Torokhov 0 siblings, 1 reply; 14+ messages in thread From: LuK1337 @ 2020-04-15 18:59 UTC (permalink / raw) Cc: LuK1337, Dmitry Torokhov, Allison Randal, Greg Kroah-Hartman, Thomas Gleixner, Richard Fontana, linux-input, linux-kernel 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: LuK1337 <priv.luk@gmail.com> --- 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 }; /* -- 2.26.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] Input: xpad - Update xboxone fw2015 init packet 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 0 siblings, 1 reply; 14+ messages in thread From: Dmitry Torokhov @ 2020-04-19 4:16 UTC (permalink / raw) To: LuK1337 Cc: Allison Randal, Greg Kroah-Hartman, Thomas Gleixner, Richard Fontana, linux-input, linux-kernel Hi, On Wed, Apr 15, 2020 at 08:59:40PM +0200, LuK1337 wrote: > 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: LuK1337 <priv.luk@gmail.com> Thank you for the patch by the signed off needs a real name please. Thanks. -- Dmitry ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] Input: xpad - Update xboxone fw2015 init packet 2020-04-19 4:16 ` Dmitry Torokhov @ 2020-04-19 7:46 ` LuK1337 2020-04-19 18:01 ` Dmitry Torokhov 0 siblings, 1 reply; 14+ messages in thread From: LuK1337 @ 2020-04-19 7:46 UTC (permalink / raw) Cc: Łukasz Patron, Dmitry Torokhov, Greg Kroah-Hartman, Richard Fontana, Thomas Gleixner, Allison Randal, linux-input, linux-kernel 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> --- 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 }; /* -- 2.26.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] Input: xpad - Update xboxone fw2015 init packet 2020-04-19 7:46 ` LuK1337 @ 2020-04-19 18:01 ` Dmitry Torokhov [not found] ` <CAJmEJMzzFO1G=iQy=EfwQ89iWMjpcpupBjBkG29aigqYsc36bA@mail.gmail.com> 2020-04-21 4:56 ` Cameron Gutman 0 siblings, 2 replies; 14+ messages in thread From: Dmitry Torokhov @ 2020-04-19 18:01 UTC (permalink / raw) To: LuK1337, Cameron Gutman, Mark Furneaux Cc: Greg Kroah-Hartman, Richard Fontana, Thomas Gleixner, Allison Randal, linux-input, linux-kernel 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? > --- > 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 > }; > > /* > -- > 2.26.0 > Thanks. -- Dmitry ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <CAJmEJMzzFO1G=iQy=EfwQ89iWMjpcpupBjBkG29aigqYsc36bA@mail.gmail.com>]
* Re: [PATCH] Input: xpad - Update xboxone fw2015 init packet [not found] ` <CAJmEJMzzFO1G=iQy=EfwQ89iWMjpcpupBjBkG29aigqYsc36bA@mail.gmail.com> @ 2020-04-19 18:22 ` LuK1337 0 siblings, 0 replies; 14+ messages in thread From: LuK1337 @ 2020-04-19 18:22 UTC (permalink / raw) Cc: LuK1337, Dmitry Torokhov, Allison Randal, Greg Kroah-Hartman, Thomas Gleixner, Richard Fontana, linux-input, linux-kernel I had this issue with official Microsoft Xbox One S Controler (model: 1708); It might also be firmware version related as I recently updated my firmware to the latest one but I'm not sure about that. (also sorry for duplicate msgs that you might have received from me; I'm new to lkml) On Sun, Apr 19, 2020 at 8:14 PM LuK1337 <priv.luk@gmail.com> wrote: > > I had this issue with official Microsoft Xbox One S Controler (model: 1708); > It might also be firmware version related as I recently updated my firmware > to the latest one but I'm not sure about that. > > On Sun, Apr 19, 2020 at 8:01 PM Dmitry Torokhov <dmitry.torokhov@gmail.com> 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? >> >> > --- >> > 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 >> > }; >> > >> > /* >> > -- >> > 2.26.0 >> > >> >> Thanks. >> >> -- >> Dmitry ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] Input: xpad - Update xboxone fw2015 init packet 2020-04-19 18:01 ` Dmitry Torokhov [not found] ` <CAJmEJMzzFO1G=iQy=EfwQ89iWMjpcpupBjBkG29aigqYsc36bA@mail.gmail.com> @ 2020-04-21 4:56 ` Cameron Gutman 2020-04-21 9:24 ` [PATCH] Input: xpad - Add custom init packet for Xbox One S controllers LuK1337 1 sibling, 1 reply; 14+ messages in thread From: Cameron Gutman @ 2020-04-21 4:56 UTC (permalink / raw) To: Dmitry Torokhov, LuK1337, Mark Furneaux Cc: Greg Kroah-Hartman, Richard Fontana, Thomas Gleixner, Allison Randal, linux-input, linux-kernel 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 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] Input: xpad - Add custom init packet for Xbox One S controllers 2020-04-21 4:56 ` Cameron Gutman @ 2020-04-21 9:24 ` LuK1337 2020-04-21 18:08 ` Dmitry Torokhov 0 siblings, 1 reply; 14+ messages in thread From: LuK1337 @ 2020-04-21 9:24 UTC (permalink / raw) Cc: Łukasz Patron, Dmitry Torokhov, Richard Fontana, Greg Kroah-Hartman, Thomas Gleixner, Allison Randal, linux-input, linux-kernel From: Łukasz Patron <priv.luk@gmail.com> Sending [ 0x05, 0x20, 0x02, 0x0f, 0x06 ] packet for Xbox One S controllers fixes an issue where controller is stuck in Bluetooth mode and not sending any inputs. Signed-off-by: Łukasz Patron <priv.luk@gmail.com> --- drivers/input/joystick/xpad.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 6b40a1c68f9f..4e1781968411 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -458,6 +458,15 @@ static const u8 xboxone_fw2015_init[] = { 0x05, 0x20, 0x00, 0x01, 0x00 }; +/* + * This packet is required for Xbox One S pads (0x045e:0x02ea) + * to initialize the controller that was previously used in + * Bluetooth mode. + */ +static const u8 xboxone_s_init[] = { + 0x05, 0x20, 0x02, 0x0f, 0x06 +}; + /* * This packet is required for the Titanfall 2 Xbox One pads * (0x0e6f:0x0165) to finish initialization and for Hori pads @@ -516,6 +525,7 @@ static const struct xboxone_init_packet xboxone_init_packets[] = { XBOXONE_INIT_PKT(0x0e6f, 0x0165, xboxone_hori_init), XBOXONE_INIT_PKT(0x0f0d, 0x0067, xboxone_hori_init), XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_fw2015_init), + XBOXONE_INIT_PKT(0x045e, 0x02ea, xboxone_s_init), XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init1), XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init2), XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init), -- 2.26.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] Input: xpad - Add custom init packet for Xbox One S controllers 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 0 siblings, 1 reply; 14+ messages in thread From: Dmitry Torokhov @ 2020-04-21 18:08 UTC (permalink / raw) To: LuK1337, Cameron Gutman Cc: Richard Fontana, Greg Kroah-Hartman, Thomas Gleixner, Allison Randal, linux-input, linux-kernel Adding Cameron... On Tue, Apr 21, 2020 at 11:24:33AM +0200, LuK1337 wrote: > From: Łukasz Patron <priv.luk@gmail.com> > > Sending [ 0x05, 0x20, 0x02, 0x0f, 0x06 ] packet for > Xbox One S controllers fixes an issue where controller > is stuck in Bluetooth mode and not sending any inputs. > > Signed-off-by: Łukasz Patron <priv.luk@gmail.com> > --- > drivers/input/joystick/xpad.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c > index 6b40a1c68f9f..4e1781968411 100644 > --- a/drivers/input/joystick/xpad.c > +++ b/drivers/input/joystick/xpad.c > @@ -458,6 +458,15 @@ static const u8 xboxone_fw2015_init[] = { > 0x05, 0x20, 0x00, 0x01, 0x00 > }; > > +/* > + * This packet is required for Xbox One S pads (0x045e:0x02ea) > + * to initialize the controller that was previously used in > + * Bluetooth mode. > + */ > +static const u8 xboxone_s_init[] = { > + 0x05, 0x20, 0x02, 0x0f, 0x06 > +}; > + > /* > * This packet is required for the Titanfall 2 Xbox One pads > * (0x0e6f:0x0165) to finish initialization and for Hori pads > @@ -516,6 +525,7 @@ static const struct xboxone_init_packet xboxone_init_packets[] = { > XBOXONE_INIT_PKT(0x0e6f, 0x0165, xboxone_hori_init), > XBOXONE_INIT_PKT(0x0f0d, 0x0067, xboxone_hori_init), > XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_fw2015_init), > + XBOXONE_INIT_PKT(0x045e, 0x02ea, xboxone_s_init), > XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init1), > XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init2), > XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init), > -- > 2.26.0 > -- Dmitry ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] Input: xpad - Add custom init packet for Xbox One S controllers 2020-04-21 18:08 ` Dmitry Torokhov @ 2020-04-22 0:54 ` Cameron Gutman 2020-04-22 7:45 ` LuK1337 ` (2 more replies) 0 siblings, 3 replies; 14+ messages in thread From: Cameron Gutman @ 2020-04-22 0:54 UTC (permalink / raw) To: Dmitry Torokhov, LuK1337 Cc: Richard Fontana, Greg Kroah-Hartman, Thomas Gleixner, Allison Randal, linux-input, linux-kernel On 4/21/20 11:08 AM, Dmitry Torokhov wrote: > Adding Cameron... > > On Tue, Apr 21, 2020 at 11:24:33AM +0200, LuK1337 wrote: >> From: Łukasz Patron <priv.luk@gmail.com> >> >> Sending [ 0x05, 0x20, 0x02, 0x0f, 0x06 ] packet for >> Xbox One S controllers fixes an issue where controller >> is stuck in Bluetooth mode and not sending any inputs. >> This one is much better. It's working on both the old 3.1 firmware and the new 4.8 firmware for the Xbox One S controller. Just for fun I also decided to test this against my other Xbox One gamepads: - idVendor=045e, idProduct=02ea, bcdDevice= 3.01 - idVendor=045e, idProduct=02ea, bcdDevice= 4.08 - idVendor=045e, idProduct=02dd, bcdDevice= 2.03 - idVendor=24c6, idProduct=543a, bcdDevice= 1.01 Initialization was successful on all 4 tested gamepads, so this packet looks well-tolerated across the range of devices. I think we should also mark this for stable to get this backported to older kernels, otherwise input will break as users update their firmware. Since you mentioned you are new to LKML, you can read about stable updates here [0] and include the Cc tag on v2 of this patch with my suggested changes below if you agree. >> Signed-off-by: Łukasz Patron <priv.luk@gmail.com> >> --- >> drivers/input/joystick/xpad.c | 10 ++++++++++ >> 1 file changed, 10 insertions(+) >> >> diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c >> index 6b40a1c68f9f..4e1781968411 100644 >> --- a/drivers/input/joystick/xpad.c >> +++ b/drivers/input/joystick/xpad.c >> @@ -458,6 +458,15 @@ static const u8 xboxone_fw2015_init[] = { >> 0x05, 0x20, 0x00, 0x01, 0x00 >> }; >> >> +/* >> + * This packet is required for Xbox One S pads (0x045e:0x02ea) >> + * to initialize the controller that was previously used in >> + * Bluetooth mode. >> + */ >> +static const u8 xboxone_s_init[] = { >> + 0x05, 0x20, 0x02, 0x0f, 0x06 >> +}; The sequence numbers are populated when the driver sends the init packet, so you should go ahead and replace that 0x02 with 0x00 to match the other packets. >> + >> /* >> * This packet is required for the Titanfall 2 Xbox One pads >> * (0x0e6f:0x0165) to finish initialization and for Hori pads >> @@ -516,6 +525,7 @@ static const struct xboxone_init_packet xboxone_init_packets[] = { >> XBOXONE_INIT_PKT(0x0e6f, 0x0165, xboxone_hori_init), >> XBOXONE_INIT_PKT(0x0f0d, 0x0067, xboxone_hori_init), >> XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_fw2015_init), >> + XBOXONE_INIT_PKT(0x045e, 0x02ea, xboxone_s_init), Can you also add an entry here for the Xbox One Elite Series 2 (0x045e, 0x0b00) gamepad? According to [1], it has the same problem as the Xbox One S with the 4.8 firmware when exiting Bluetooth mode. >> XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init1), >> XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init2), >> XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init), >> -- >> 2.26.0 >> > [0]: https://www.kernel.org/doc/html/v5.6/process/stable-kernel-rules.html [1]: https://github.com/spurious/SDL-mirror/commit/a0f80727972429bad309d7cf6cca949801d11d45 Regards, Cameron ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] Input: xpad - Add custom init packet for Xbox One S controllers 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 2 siblings, 0 replies; 14+ messages in thread From: LuK1337 @ 2020-04-22 7:45 UTC (permalink / raw) Cc: Cameron Gutman, Łukasz Patron, Dmitry Torokhov, Allison Randal, Thomas Gleixner, Greg Kroah-Hartman, Richard Fontana, linux-input, linux-kernel From: Łukasz Patron <priv.luk@gmail.com> Sending [ 0x05, 0x20, 0x02, 0x0f, 0x06 ] packet for Xbox One S controllers fixes an issue where controller is stuck in Bluetooth mode and not sending any inputs. Signed-off-by: Łukasz Patron <priv.luk@gmail.com> --- drivers/input/joystick/xpad.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 6b40a1c68f9f..c77cdb3b62b5 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -458,6 +458,16 @@ static const u8 xboxone_fw2015_init[] = { 0x05, 0x20, 0x00, 0x01, 0x00 }; +/* + * This packet is required for Xbox One S (0x045e:0x02ea) + * and Xbox One Elite Series 2 (0x045e:0x0b00) pads to + * initialize the controller that was previously used in + * Bluetooth mode. + */ +static const u8 xboxone_s_init[] = { + 0x05, 0x20, 0x00, 0x0f, 0x06 +}; + /* * This packet is required for the Titanfall 2 Xbox One pads * (0x0e6f:0x0165) to finish initialization and for Hori pads @@ -516,6 +526,8 @@ static const struct xboxone_init_packet xboxone_init_packets[] = { XBOXONE_INIT_PKT(0x0e6f, 0x0165, xboxone_hori_init), XBOXONE_INIT_PKT(0x0f0d, 0x0067, xboxone_hori_init), XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_fw2015_init), + XBOXONE_INIT_PKT(0x045e, 0x02ea, xboxone_s_init), + XBOXONE_INIT_PKT(0x045e, 0x0b00, xboxone_s_init), XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init1), XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init2), XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init), -- 2.26.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH] Input: xpad - Add custom init packet for Xbox One S controllers 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 2 siblings, 0 replies; 14+ messages in thread From: LuK1337 @ 2020-04-22 7:46 UTC (permalink / raw) Cc: Cameron Gutman, Łukasz Patron, stable, Dmitry Torokhov, Greg Kroah-Hartman, Allison Randal, Thomas Gleixner, Richard Fontana, linux-input, linux-kernel From: Łukasz Patron <priv.luk@gmail.com> Sending [ 0x05, 0x20, 0x02, 0x0f, 0x06 ] packet for Xbox One S controllers fixes an issue where controller is stuck in Bluetooth mode and not sending any inputs. Signed-off-by: Łukasz Patron <priv.luk@gmail.com> Cc: stable@vger.kernel.org --- drivers/input/joystick/xpad.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 6b40a1c68f9f..c77cdb3b62b5 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -458,6 +458,16 @@ static const u8 xboxone_fw2015_init[] = { 0x05, 0x20, 0x00, 0x01, 0x00 }; +/* + * This packet is required for Xbox One S (0x045e:0x02ea) + * and Xbox One Elite Series 2 (0x045e:0x0b00) pads to + * initialize the controller that was previously used in + * Bluetooth mode. + */ +static const u8 xboxone_s_init[] = { + 0x05, 0x20, 0x00, 0x0f, 0x06 +}; + /* * This packet is required for the Titanfall 2 Xbox One pads * (0x0e6f:0x0165) to finish initialization and for Hori pads @@ -516,6 +526,8 @@ static const struct xboxone_init_packet xboxone_init_packets[] = { XBOXONE_INIT_PKT(0x0e6f, 0x0165, xboxone_hori_init), XBOXONE_INIT_PKT(0x0f0d, 0x0067, xboxone_hori_init), XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_fw2015_init), + XBOXONE_INIT_PKT(0x045e, 0x02ea, xboxone_s_init), + XBOXONE_INIT_PKT(0x045e, 0x0b00, xboxone_s_init), XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init1), XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init2), XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init), -- 2.26.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH] Input: xpad - Add custom init packet for Xbox One S controllers 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 2 siblings, 1 reply; 14+ messages in thread From: LuK1337 @ 2020-04-22 7:52 UTC (permalink / raw) Cc: Cameron Gutman, Łukasz Patron, stable, Dmitry Torokhov, Thomas Gleixner, Allison Randal, Greg Kroah-Hartman, Richard Fontana, linux-input, linux-kernel From: Łukasz Patron <priv.luk@gmail.com> Sending [ 0x05, 0x20, 0x00, 0x0f, 0x06 ] packet for Xbox One S controllers fixes an issue where controller is stuck in Bluetooth mode and not sending any inputs. Signed-off-by: Łukasz Patron <priv.luk@gmail.com> Cc: stable@vger.kernel.org --- drivers/input/joystick/xpad.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 6b40a1c68f9f..c77cdb3b62b5 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -458,6 +458,16 @@ static const u8 xboxone_fw2015_init[] = { 0x05, 0x20, 0x00, 0x01, 0x00 }; +/* + * This packet is required for Xbox One S (0x045e:0x02ea) + * and Xbox One Elite Series 2 (0x045e:0x0b00) pads to + * initialize the controller that was previously used in + * Bluetooth mode. + */ +static const u8 xboxone_s_init[] = { + 0x05, 0x20, 0x00, 0x0f, 0x06 +}; + /* * This packet is required for the Titanfall 2 Xbox One pads * (0x0e6f:0x0165) to finish initialization and for Hori pads @@ -516,6 +526,8 @@ static const struct xboxone_init_packet xboxone_init_packets[] = { XBOXONE_INIT_PKT(0x0e6f, 0x0165, xboxone_hori_init), XBOXONE_INIT_PKT(0x0f0d, 0x0067, xboxone_hori_init), XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_fw2015_init), + XBOXONE_INIT_PKT(0x045e, 0x02ea, xboxone_s_init), + XBOXONE_INIT_PKT(0x045e, 0x0b00, xboxone_s_init), XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init1), XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init2), XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init), -- 2.26.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] Input: xpad - Add custom init packet for Xbox One S controllers 2020-04-22 7:52 ` LuK1337 @ 2020-04-22 17:20 ` Cameron Gutman 2020-04-22 21:13 ` Dmitry Torokhov 0 siblings, 1 reply; 14+ messages in thread From: Cameron Gutman @ 2020-04-22 17:20 UTC (permalink / raw) To: LuK1337 Cc: stable, Dmitry Torokhov, Thomas Gleixner, Allison Randal, Greg Kroah-Hartman, Richard Fontana, linux-input, linux-kernel On 4/22/20 12:52 AM, LuK1337 wrote: > From: Łukasz Patron <priv.luk@gmail.com> > > Sending [ 0x05, 0x20, 0x00, 0x0f, 0x06 ] packet for > Xbox One S controllers fixes an issue where controller > is stuck in Bluetooth mode and not sending any inputs. > > Signed-off-by: Łukasz Patron <priv.luk@gmail.com> > Cc: stable@vger.kernel.org LGTM. Tested working on both of my Xbox One S gamepads: - idVendor=045e, idProduct=02ea, bcdDevice= 3.01 - idVendor=045e, idProduct=02ea, bcdDevice= 4.08 Reviewed-by: Cameron Gutman <aicommander@gmail.com> > --- > drivers/input/joystick/xpad.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c > index 6b40a1c68f9f..c77cdb3b62b5 100644 > --- a/drivers/input/joystick/xpad.c > +++ b/drivers/input/joystick/xpad.c > @@ -458,6 +458,16 @@ static const u8 xboxone_fw2015_init[] = { > 0x05, 0x20, 0x00, 0x01, 0x00 > }; > > +/* > + * This packet is required for Xbox One S (0x045e:0x02ea) > + * and Xbox One Elite Series 2 (0x045e:0x0b00) pads to > + * initialize the controller that was previously used in > + * Bluetooth mode. > + */ > +static const u8 xboxone_s_init[] = { > + 0x05, 0x20, 0x00, 0x0f, 0x06 > +}; > + > /* > * This packet is required for the Titanfall 2 Xbox One pads > * (0x0e6f:0x0165) to finish initialization and for Hori pads > @@ -516,6 +526,8 @@ static const struct xboxone_init_packet xboxone_init_packets[] = { > XBOXONE_INIT_PKT(0x0e6f, 0x0165, xboxone_hori_init), > XBOXONE_INIT_PKT(0x0f0d, 0x0067, xboxone_hori_init), > XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_fw2015_init), > + XBOXONE_INIT_PKT(0x045e, 0x02ea, xboxone_s_init), > + XBOXONE_INIT_PKT(0x045e, 0x0b00, xboxone_s_init), > XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init1), > XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init2), > XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init), > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] Input: xpad - Add custom init packet for Xbox One S controllers 2020-04-22 17:20 ` Cameron Gutman @ 2020-04-22 21:13 ` Dmitry Torokhov 0 siblings, 0 replies; 14+ messages in thread From: Dmitry Torokhov @ 2020-04-22 21:13 UTC (permalink / raw) To: Cameron Gutman Cc: LuK1337, stable, Thomas Gleixner, Allison Randal, Greg Kroah-Hartman, Richard Fontana, linux-input, linux-kernel On Wed, Apr 22, 2020 at 10:20:08AM -0700, Cameron Gutman wrote: > On 4/22/20 12:52 AM, LuK1337 wrote: > > From: Łukasz Patron <priv.luk@gmail.com> > > > > Sending [ 0x05, 0x20, 0x00, 0x0f, 0x06 ] packet for > > Xbox One S controllers fixes an issue where controller > > is stuck in Bluetooth mode and not sending any inputs. > > > > Signed-off-by: Łukasz Patron <priv.luk@gmail.com> > > Cc: stable@vger.kernel.org > > LGTM. Tested working on both of my Xbox One S gamepads: > - idVendor=045e, idProduct=02ea, bcdDevice= 3.01 > - idVendor=045e, idProduct=02ea, bcdDevice= 4.08 > > Reviewed-by: Cameron Gutman <aicommander@gmail.com> Applied, thank you. > > > --- > > drivers/input/joystick/xpad.c | 12 ++++++++++++ > > 1 file changed, 12 insertions(+) > > > > diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c > > index 6b40a1c68f9f..c77cdb3b62b5 100644 > > --- a/drivers/input/joystick/xpad.c > > +++ b/drivers/input/joystick/xpad.c > > @@ -458,6 +458,16 @@ static const u8 xboxone_fw2015_init[] = { > > 0x05, 0x20, 0x00, 0x01, 0x00 > > }; > > > > +/* > > + * This packet is required for Xbox One S (0x045e:0x02ea) > > + * and Xbox One Elite Series 2 (0x045e:0x0b00) pads to > > + * initialize the controller that was previously used in > > + * Bluetooth mode. > > + */ > > +static const u8 xboxone_s_init[] = { > > + 0x05, 0x20, 0x00, 0x0f, 0x06 > > +}; > > + > > /* > > * This packet is required for the Titanfall 2 Xbox One pads > > * (0x0e6f:0x0165) to finish initialization and for Hori pads > > @@ -516,6 +526,8 @@ static const struct xboxone_init_packet xboxone_init_packets[] = { > > XBOXONE_INIT_PKT(0x0e6f, 0x0165, xboxone_hori_init), > > XBOXONE_INIT_PKT(0x0f0d, 0x0067, xboxone_hori_init), > > XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_fw2015_init), > > + XBOXONE_INIT_PKT(0x045e, 0x02ea, xboxone_s_init), > > + XBOXONE_INIT_PKT(0x045e, 0x0b00, xboxone_s_init), > > XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init1), > > XBOXONE_INIT_PKT(0x0e6f, 0x0000, xboxone_pdp_init2), > > XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init), > > > -- Dmitry ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2020-04-22 21:13 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
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).