[alsa-devel] [PATCH] ALSA: usb-audio: Don't resubmit pending URBs at MIDI error recovery
Takashi Iwai
tiwai at suse.de
Sat Dec 6 21:45:39 CET 2014
At Sat, 06 Dec 2014 20:54:48 +0100,
Clemens Ladisch wrote:
>
> Takashi Iwai wrote:
> > In snd_usbmidi_error_timer(), the driver tries to resubmit MIDI input
> > URBs to reactivate the MIDI stream, but this causes the error when
> > some of URBs are still pending
>
> I wonder what kept the other URBs alive.
I'm not quite sure, but maybe it's controller-specific issues.
FWIW, the reporter used R-Pi.
> > For avoiding these errors, check the pending URBs and skip
> > resubmitting such ones.
> >
> > Reported-and-tested-by: Stefan Seyfried <stefan.seyfried at googlemail.com>
> > Cc: <stable at vger.kernel.org>
> > Signed-off-by: Takashi Iwai <tiwai at suse.de>
>
> Anyway,
> Acked-by: Clemens Ladisch <clemens at ladisch.de>
Queued now.
thanks,
Takashi
> > ---
> > sound/usb/midi.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/sound/usb/midi.c b/sound/usb/midi.c
> > index d3d49525a16b..5bfb695547f8 100644
> > --- a/sound/usb/midi.c
> > +++ b/sound/usb/midi.c
> > @@ -365,6 +365,8 @@ static void snd_usbmidi_error_timer(unsigned long data)
> > if (in && in->error_resubmit) {
> > in->error_resubmit = 0;
> > for (j = 0; j < INPUT_URBS; ++j) {
> > + if (atomic_read(&in->urbs[j]->use_count))
> > + continue;
> > in->urbs[j]->dev = umidi->dev;
> > snd_usbmidi_submit_urb(in->urbs[j], GFP_ATOMIC);
> > }
>
More information about the Alsa-devel
mailing list