Message ID | 561FFC47.3060802@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Pavel, On Thu, Oct 15, 2015 at 09:19:35PM +0200, Pavel Rojtberg wrote: > Hey Dimitry, > > I have seen you have also applied > "[PATCH 08/15] Input: xpad: query Wireless controller state at init". > However this change is unfortunately incomplete without > "[PATCH 09/15] Input: xpad: handle "present" and "gone" correctly". > > As is both the presence as well as the LED packets are sent > immediately at init > which triggers the the "URB xxxx submitted while active" Warning and causes > any initialization to fail. > > Attached is a fixup against current input/ next of the chunk that is in > [PATCH 09/15], but should have been in [PATCH 08/15]. > Sorry for the inconvenience. > > do not call xpad_identify_controller at init: it conflicts with > the already sent presence packet and will be called by > xpad360w_process_packet as needed anyway. I see. But I believe we should only do that for wireless controllers, because we send the presence request only for XTYPE_XBOX360W and LEDs are also present on non-wireless variant, right? So I think we want: if (xpad->xtype == XTYPE_XBOX360) { /* * Light up the segment corresponding to controller * number on wired devices. On wireless we'll do that * when they respond to "presence" packet. */ xpad_identify_controller(xpad); } Thanks.
Am 17.10.2015 um 18:49 schrieb Dmitry Torokhov: > Hi Pavel, > > On Thu, Oct 15, 2015 at 09:19:35PM +0200, Pavel Rojtberg wrote: >> Hey Dimitry, >> >> I have seen you have also applied >> "[PATCH 08/15] Input: xpad: query Wireless controller state at init". >> However this change is unfortunately incomplete without >> "[PATCH 09/15] Input: xpad: handle "present" and "gone" correctly". >> >> As is both the presence as well as the LED packets are sent >> immediately at init >> which triggers the the "URB xxxx submitted while active" Warning and causes >> any initialization to fail. >> >> Attached is a fixup against current input/ next of the chunk that is in >> [PATCH 09/15], but should have been in [PATCH 08/15]. >> Sorry for the inconvenience. >> >> do not call xpad_identify_controller at init: it conflicts with >> the already sent presence packet and will be called by >> xpad360w_process_packet as needed anyway. > I see. But I believe we should only do that for wireless controllers, > because we send the presence request only for XTYPE_XBOX360W and LEDs > are also present on non-wireless variant, right? > > So I think we want: > > if (xpad->xtype == XTYPE_XBOX360) { > /* > * Light up the segment corresponding to controller > * number on wired devices. On wireless we'll do that > * when they respond to "presence" packet. > */ > xpad_identify_controller(xpad); > } > > Thanks. yes, you are right. -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index d382d48..acb8859 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -1001,8 +1001,6 @@ static int xpad_led_probe(struct usb_xpad *xpad) if (error) goto err_free_id; - /* Light up the segment corresponding to controller number */ - xpad_identify_controller(xpad); return 0; err_free_id:
Hey Dimitry, I have seen you have also applied "[PATCH 08/15] Input: xpad: query Wireless controller state at init". However this change is unfortunately incomplete without "[PATCH 09/15] Input: xpad: handle "present" and "gone" correctly". As is both the presence as well as the LED packets are sent immediately at init which triggers the the "URB xxxx submitted while active" Warning and causes any initialization to fail. Attached is a fixup against current input/ next of the chunk that is in [PATCH 09/15], but should have been in [PATCH 08/15]. Sorry for the inconvenience. do not call xpad_identify_controller at init: it conflicts with the already sent presence packet and will be called by xpad360w_process_packet as needed anyway. Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com> --- drivers/input/joystick/xpad.c | 2 -- 1 file changed, 2 deletions(-)