]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: usb-audio: Add retry on -EPROTO from usb_set_interface()
authorGeoffrey D. Bennett <g@b4.vu>
Wed, 16 Apr 2025 18:49:23 +0000 (04:19 +0930)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 May 2025 07:43:49 +0000 (09:43 +0200)
commitf73ecbfa78ce650f24424c9dea46747eb0809e16
tree765978475b3af4d4457747a8dee6bc55109f70ed
parentfd1aeef3e9c7d9c469d28457d762f8f373f6393a
ALSA: usb-audio: Add retry on -EPROTO from usb_set_interface()

commit f406005e162b660dc405b4f18bf7bcb93a515608 upstream.

During initialisation of Focusrite USB audio interfaces, -EPROTO is
sometimes returned from usb_set_interface(), which sometimes prevents
the device from working: subsequent usb_set_interface() and
uac_clock_source_is_valid() calls fail.

This patch adds up to 5 retries in endpoint_set_interface(), with a
delay starting at 5ms and doubling each time. 5 retries was chosen to
allow for longer than expected waits for the interface to start
responding correctly; in testing, a single 5ms delay was sufficient to
fix the issue.

Closes: https://github.com/geoffreybennett/fcp-support/issues/2
Cc: stable@vger.kernel.org
Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://patch.msgid.link/Z//7s9dKsmVxHzY2@m.b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/usb/endpoint.c