From: Takashi Iwai Subject: Re: [patch] usb6fire: prevent driver panic state when stopping Date: Fri, 07 Dec 2012 15:24:02 +0100 Message-ID: References: <1354872409.2161.7.camel@paragon.slim> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 8CA77261698 for ; Fri, 7 Dec 2012 15:24:02 +0100 (CET) In-Reply-To: <1354872409.2161.7.camel@paragon.slim> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Jurgen Kramer Cc: alsa-devel@alsa-project.org, torsten.schenk@zoho.com List-Id: alsa-devel@alsa-project.org At Fri, 07 Dec 2012 10:26:43 +0100, Jurgen Kramer wrote: > > Hi, > > 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 Thanks, applied. Takashi > > diff -uNrp linux/sound/usb/6fire/pcm.c linux.new/sound/usb/6fire/pcm.c > --- linux/sound/usb/6fire/pcm.c 2012-11-23 17:01:41.754673597 +0100 > +++ linux.new/sound/usb/6fire/pcm.c 2012-12-07 10:09:11.386666744 +0100 > @@ -135,6 +135,9 @@ static void usb6fire_pcm_stream_stop(str > 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); > > > > Jurgen > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel >