]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ALSA: snd_usb_caiaq: track submitted output urbs
authorDaniel Mack <zonque@gmail.com>
Sun, 14 Aug 2011 09:31:16 +0000 (11:31 +0200)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 17 May 2012 15:21:33 +0000 (11:21 -0400)
commitcccda14532dfd2a1bc5e33c38310abe333051ed1
tree959985f56f8aa6b57ec2fdd6c5a93733591749e4
parent64876634aaf6e8c96f563377cc599852ec08cd88
ALSA: snd_usb_caiaq: track submitted output urbs

commit da6094ea7d3c2295473d8f5134279307255d6ebf upstream.

The snd_usb_caiaq driver currently assumes that output urbs are serviced
in time and doesn't track when and whether they are given back by the
USB core. That usually works fine, but due to temporary limitations of
the XHCI stack, we faced that urbs were submitted more than once with
this approach.

As it's no good practice to fire and forget urbs anyway, this patch
introduces a proper bit mask to track which requests have been submitted
and given back.

That alone however doesn't make the driver work in case the host
controller is broken and doesn't give back urbs at all, and the output
stream will stop once all pre-allocated output urbs are consumed. But
it does prevent crashes of the controller stack in such cases.

See http://bugzilla.kernel.org/show_bug.cgi?id=40702 for more details.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: Matej Laitl <matej@laitl.cz>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
sound/usb/caiaq/audio.c
sound/usb/caiaq/device.h