Return-path: Received: from mail-la0-f51.google.com ([209.85.215.51]:36589 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756080Ab3GKNKz (ORCPT ); Thu, 11 Jul 2013 09:10:55 -0400 Received: by mail-la0-f51.google.com with SMTP id fq12so6711673lab.38 for ; Thu, 11 Jul 2013 06:10:53 -0700 (PDT) Message-ID: <51DEAEDB.2060600@cogentembedded.com> (sfid-20130711_151110_556525_99B6E5BE) Date: Thu, 11 Jul 2013 17:10:51 +0400 From: Sergei Shtylyov MIME-Version: 1.0 To: Ming Lei CC: Greg Kroah-Hartman , linux-usb@vger.kernel.org, Oliver Neukum , Alan Stern , linux-input@vger.kernel.org, linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-media@vger.kernel.org, alsa-devel@alsa-project.org, Clemens Ladisch , Jaroslav Kysela , Takashi Iwai Subject: Re: [PATCH 46/50] Sound: usb: ua101: spin_lock in complete() cleanup References: <1373533573-12272-1-git-send-email-ming.lei@canonical.com> <1373533573-12272-47-git-send-email-ming.lei@canonical.com> In-Reply-To: <1373533573-12272-47-git-send-email-ming.lei@canonical.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Sender: linux-wireless-owner@vger.kernel.org List-ID: On 11-07-2013 13:06, Ming Lei wrote: Here the subject doesn't match the patch. > Complete() will be run with interrupt enabled, so disable local > interrupt before holding a global lock which is held without irqsave. > Cc: Clemens Ladisch > Cc: Jaroslav Kysela > Cc: Takashi Iwai > Cc: alsa-devel@alsa-project.org > Signed-off-by: Ming Lei > --- > sound/usb/misc/ua101.c | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > diff --git a/sound/usb/misc/ua101.c b/sound/usb/misc/ua101.c > index 8b5d2c5..52a60c6 100644 > --- a/sound/usb/misc/ua101.c > +++ b/sound/usb/misc/ua101.c > @@ -613,14 +613,24 @@ static int start_usb_playback(struct ua101 *ua) > > static void abort_alsa_capture(struct ua101 *ua) > { > - if (test_bit(ALSA_CAPTURE_RUNNING, &ua->states)) > + if (test_bit(ALSA_CAPTURE_RUNNING, &ua->states)) { > + unsigned long flags; > + > + local_irq_save(flags); > snd_pcm_stop(ua->capture.substream, SNDRV_PCM_STATE_XRUN); > + local_irq_restore(flags); > + } > } > > static void abort_alsa_playback(struct ua101 *ua) > { > - if (test_bit(ALSA_PLAYBACK_RUNNING, &ua->states)) > + if (test_bit(ALSA_PLAYBACK_RUNNING, &ua->states)) { > + unsigned long flags; > + > + local_irq_save(flags); > snd_pcm_stop(ua->playback.substream, SNDRV_PCM_STATE_XRUN); > + local_irq_restore(flags); > + } > } WBR, Sergei