Skip to contentSkip to conversation

Input: xpad - fix input from Covert Forces Xbox One controller

PATCH In review Cameron Gutman 2 participants 2 messages Dec 6, 2015 – Dec 10, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: xpad - fix input from Covert Forces Xbox One controller

The Covert Forces edition of the Xbox One controller requires the full 5 byte initialization packet to work at all. The 5 byte packet was known to be needed for proper rumble support, but it looks like it's needed even without rumble on these controllers.

---
 drivers/input/joystick/xpad.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/input/joystick/xpad.c +4 -1
index fd4100d..de89de0 100644
@@ -1052,7 +1052,10 @@ static int xpad_open(struct input_dev *dev)
 		/* Xbox one controller needs to be initialized. */
 		xpad->odata[0] = 0x05;
 		xpad->odata[1] = 0x20;
-		xpad->irq_out->transfer_buffer_length = 2;
+		xpad->odata[2] = 0x00;
+		xpad->odata[3] = 0x01;
+		xpad->odata[4] = 0x00;
+		xpad->irq_out->transfer_buffer_length = 5;
 		return usb_submit_urb(xpad->irq_out, GFP_KERNEL);
 	}
 
Signature · 1 line
2.5.0
maintainer
#1 lore raw

Hi Cameron,

Quoted 4 lines · Cameron Gutman

The Covert Forces edition of the Xbox One controller requires the full 5 byte initialization packet to work at all. The 5 byte packet was known to be needed for proper rumble support, but it looks like it's needed even without rumble on these controllers.

I already have a patch that does this and rumble for these controllers in my queue (in xpad branch) so this one is not needed.

Thank you.

Quoted 24 lines
---
 drivers/input/joystick/xpad.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/input/joystick/xpad.c +4 -1
index fd4100d..de89de0 100644
@@ -1052,7 +1052,10 @@ static int xpad_open(struct input_dev *dev)
 		/* Xbox one controller needs to be initialized. */
 		xpad->odata[0] = 0x05;
 		xpad->odata[1] = 0x20;
-		xpad->irq_out->transfer_buffer_length = 2;
+		xpad->odata[2] = 0x00;
+		xpad->odata[3] = 0x01;
+		xpad->odata[4] = 0x00;
+		xpad->irq_out->transfer_buffer_length = 5;
 		return usb_submit_urb(xpad->irq_out, GFP_KERNEL);
 	}
 
Signature · 1 line
2.5.0
Signature · 1 line
Dmitry