diff options
author | Ingo Molnar <mingo@kernel.org> | 2025-05-06 19:42:00 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-05-06 19:42:00 +0200 |
commit | 570d58b12fbf7bae0ba72d929ccf914a4df5ca7c (patch) | |
tree | dfed4e4970ba5a5a4c4c726b4d55d9f4394683c3 /sound/usb/endpoint.c | |
parent | 502ad6e5a6196840976c4c84b2ea2f9769942fbe (diff) | |
parent | 92a09c47464d040866cf2b4cd052bc60555185fb (diff) |
Merge tag 'v6.15-rc5' into x86/msr, to pick up fixes and to resolve conflicts
Conflicts:
drivers/cpufreq/intel_pstate.c
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'sound/usb/endpoint.c')
-rw-r--r-- | sound/usb/endpoint.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index a29f28eb7d0c..f36ec98da460 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c @@ -926,6 +926,8 @@ static int endpoint_set_interface(struct snd_usb_audio *chip, { int altset = set ? ep->altsetting : 0; int err; + int retries = 0; + const int max_retries = 5; if (ep->iface_ref->altset == altset) return 0; @@ -935,8 +937,13 @@ static int endpoint_set_interface(struct snd_usb_audio *chip, usb_audio_dbg(chip, "Setting usb interface %d:%d for EP 0x%x\n", ep->iface, altset, ep->ep_num); +retry: err = usb_set_interface(chip->dev, ep->iface, altset); if (err < 0) { + if (err == -EPROTO && ++retries <= max_retries) { + msleep(5 * (1 << (retries - 1))); + goto retry; + } usb_audio_err_ratelimited( chip, "%d:%d: usb_set_interface failed (%d)\n", ep->iface, altset, err); |