Skip to content

Input: xpad: fix wireless pad connection and URB out

Pavel Rojtberg linux-input 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8Input: xpad: clarify LED enumerationdrivers/input/joystick/xpad.c+8 -120 replies
2/8Input: xpad: remove bulk out URBdrivers/input/joystick/xpad.c+1 -780 replies
3/8Input: xpad: move the input device creation to a new functiondrivers/input/joystick/xpad.c+106 -790 replies
4/8Input: xpad: query Wireless controller state at initdrivers/input/joystick/xpad.c+29 -41 reply
5/8Input: xpad: handle "present" and "gone" correctlydrivers/input/joystick/xpad.c+35 -81 reply
6/8Input: xpad: use bitmask for finding the pad_nrdrivers/input/joystick/xpad.c+15 -52 replies
7/8Input: xpad: factor out URB submission in xpad_play_effectdrivers/input/joystick/xpad.c+69 -710 replies
8/8Input: xpad: do not submit active URBsdrivers/input/joystick/xpad.c+39 -42 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/8] Input: xpad: fix wireless pad connection and URB out

From: Pavel Rojtberg <[email protected]>

This series tries to finish the work of:
http://www.spinics.net/lists/linux-input/msg29445.html
Citing the original submission:
Rework the xpad driver to fix the issue where when a wireless xpad controller is plugged in, 4 joystick devices are created, no matter how many are really attached to the system.
This is done by dynamically creating the devices only when they are found by the wireless receiver.
Along the way all usages of the out URB were guarded by the mutex and a active flag was introduced to prevent usage while active.
This makes outbound communication more robust. (LED, FF, presence query)

Patches 1-2 clean up the x360 LED code after:
http://www.spinics.net/lists/linux-input/msg39147.html
partifularly the LED command on x360w pads is not submitted twice any more. They are the same as already submitted here:
http://www.spinics.net/lists/linux-input/msg39438.html

Patches 3-6 implement the actual "on demand" creation/ deletion of input devices. To this end pad enumeration had to be changed from an monotonic counter to a bitmask based counter. See Patch 6 for rationale.

Patches 7-8 prevent sending active URBs. This was alrady an issue before, but is now more pressing as we always send the query packet on driver load. (x360w)

Pavel Rojtberg (6):
Input: xpad: clarify LED enumeration
Input: xpad: remove bulk out URB
Input: xpad: query Wireless controller state at init
Input: xpad: use bitmask for finding the pad_nr
Input: xpad: factor out URB submission in xpad_play_effect
Input: xpad: do not submit active URBs

Pierre-Loup A. Griffais (2):
Input: xpad: move the input device creation to a new function
Input: xpad: handle "present" and "gone" correctly

 xpad.c | 539 +++++++++++++++++++++++++++++++++++------------------------------
 1 file changed, 290 insertions(+), 249 deletions(-)
Signature · 1 line
1.9.1