aboutsummaryrefslogtreecommitdiff
path: root/sound/usb/endpoint.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-08-15 12:32:00 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-14 09:59:37 -0700
commitcaecd86a5109f3417e349f42886dfb48d067c3c0 (patch)
treec6637d26770fca575c5dba555ec54ed6401ca2b9 /sound/usb/endpoint.c
parent96f7b21cab02436e0757de03a9633cc85cc8f1cf (diff)
ALSA: usb-audio: Fix scheduling-while-atomic bug in PCM capture stream
commit e9ba389c5ffc4dd29dfe17e00e48877302111135 upstream. A PCM capture stream on usb-audio causes a scheduling-while-atomic BUG, as reported in the bugzilla entry below. It's because snd_usb_endpoint_start() is called at first at trigger START for a capture stream, and this function contains the left-over EP deactivation codes. The problem doesn't happen for a playback stream because the function is called at PCM prepare time, which can sleep. This patch fixes the BUG by moving the EP deactivation code into the PCM prepare callback. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=46011 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/usb/endpoint.c')
-rw-r--r--sound/usb/endpoint.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 0f647d22cb4..c4118120268 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -821,10 +821,6 @@ int snd_usb_endpoint_start(struct snd_usb_endpoint *ep)
if (++ep->use_count != 1)
return 0;
- /* just to be sure */
- deactivate_urbs(ep, 0, 1);
- wait_clear_urbs(ep);
-
ep->active_mask = 0;
ep->unlink_mask = 0;
ep->phase = 0;