Hi Vicki, Thank you for your patch. On Thu, Oct 06, 2022 at 15:12, Vicki Pfau <vi@xxxxxxxxxxx> wrote: > Some Xbox One controllers require more complete versions of the controller > start-up sequence used in official software in order to function properly. > This patch adds a usb_set_interface call that matches official startup and > nominally disabled the audio interface, which isn't supported in the xpad > driver in the first place. > > Signed-off-by: Vicki Pfau <vi@xxxxxxxxxxx> > --- > drivers/input/joystick/xpad.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c > index 18190b529bca..6449665d7b61 100644 > --- a/drivers/input/joystick/xpad.c > +++ b/drivers/input/joystick/xpad.c > @@ -1509,6 +1509,13 @@ static int xpad_start_input(struct usb_xpad *xpad) > return -EIO; > > if (xpad->xtype == XTYPE_XBOXONE) { > + /* Explicitly disable the audio interface. This is needed for some > + * controllers, such as the PowerA Enhanced Wired Controller > + * for Series X|S (0x20d6:0x200e) to report the guide button */ > + error = usb_set_interface(xpad->udev, 1, 0); Can't we call this in probe() ? It seems suspicious to be called here as the usb_set_interace() doc states: "Also, drivers must not change altsettings while urbs are scheduled for endpoints in that interface;" However, we just called usb_submit_urb() before. I'm not 100% sure but I think we are contradicting the documentation here. > + if (error) Shouldn't we call usb_kill_urb() here before returing the error? It seems that's what is done in the other error path below. > + return error; > + > error = xpad_start_xbox_one(xpad); > if (error) { > usb_kill_urb(xpad->irq_in); > -- > 2.38.0