From: Clemens Ladisch <clemens@ladisch.de>
To: Takashi Iwai <tiwai@suse.de>, alsa-devel@alsa-project.org
Subject: Re: [PATCH] ALSA: usb-audio: Don't resubmit pending URBs at MIDI error recovery
Date: Sat, 06 Dec 2014 20:54:48 +0100 [thread overview]
Message-ID: <54835F08.9020500@ladisch.de> (raw)
In-Reply-To: <1417885834-10030-1-git-send-email-tiwai@suse.de>
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.
> For avoiding these errors, check the pending URBs and skip
> resubmitting such ones.
>
> Reported-and-tested-by: Stefan Seyfried <stefan.seyfried@googlemail.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Anyway,
Acked-by: Clemens Ladisch <clemens@ladisch.de>
> ---
> 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);
> }
next prev parent reply other threads:[~2014-12-06 19:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-06 17:10 [PATCH] ALSA: usb-audio: Don't resubmit pending URBs at MIDI error recovery Takashi Iwai
2014-12-06 19:54 ` Clemens Ladisch [this message]
2014-12-06 20:45 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54835F08.9020500@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.