diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-05-13 08:26:58 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-05-13 08:26:58 +0200 |
| commit | ab6dc9a6c721c2eed867c157447764ae68ff9b7e (patch) | |
| tree | 11771088cbeaaf7992d9c3729eb30169fdf4c760 /sound/usb/endpoint.c | |
| parent | 588d032e9e566997db3213dee145dbe3bda297b6 (diff) | |
| parent | 82f2b0b97b36ee3fcddf0f0780a9a0825d52fec3 (diff) | |
Merge 6.15-rc6 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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 1fed039b10ed..7b01e7b4e335 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); |
