Skip to content

Commit

Permalink
ALSA: usb6fire: prevent driver panic state when stopping
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jurgen Kramer authored and Takashi Iwai committed Dec 7, 2012
1 parent 090015a commit 9621055
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/usb/6fire/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9621055

Please sign in to comment.