summaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorJurgen Kramer <gtmkramer@xs4all.nl>2012-12-07 10:26:43 +0100
committerTakashi Iwai <tiwai@suse.de>2012-12-07 15:03:34 +0100
commit9621055fbbb190264cb6a8182b70e3f0f917d770 (patch)
tree111eb2b3bee0f31e0d599bf84608e72687532d48 /sound/usb
parent090015aeefb1360dfa2c467310530052a2965eac (diff)
downloadlinux-9621055fbbb190264cb6a8182b70e3f0f917d770.tar.bz2
ALSA: usb6fire: prevent driver panic state when stopping
The patch below prevents the 6fire usb driver going into panic state when stopping playing. On some systems the urb in handler (usb6fire_pcm_in_urb_handler) is being called while urbs are being killed off, this causes the driver to set panic state and can result in the kernel warning 'URB %p submitted while active'. Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/6fire/pcm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/usb/6fire/pcm.c b/sound/usb/6fire/pcm.c
index cabedb416fc4..e2ca12fe92e9 100644
--- a/sound/usb/6fire/pcm.c
+++ b/sound/usb/6fire/pcm.c
@@ -135,6 +135,9 @@ static void usb6fire_pcm_stream_stop(struct pcm_runtime *rt)
struct control_runtime *ctrl_rt = rt->chip->control;
if (rt->stream_state != STREAM_DISABLED) {
+
+ rt->stream_state = STREAM_STOPPING;
+
for (i = 0; i < PCM_N_URBS; i++) {
usb_kill_urb(&rt->in_urbs[i].instance);
usb_kill_urb(&rt->out_urbs[i].instance);