From patchwork Thu Jul 11 09:06:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 2826120 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AFCF19F756 for ; Thu, 11 Jul 2013 09:13:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 748D92010E for ; Thu, 11 Jul 2013 09:13:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 39C48200E0 for ; Thu, 11 Jul 2013 09:13:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932670Ab3GKJNF (ORCPT ); Thu, 11 Jul 2013 05:13:05 -0400 Received: from mail-pd0-f181.google.com ([209.85.192.181]:39051 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932611Ab3GKJNC (ORCPT ); Thu, 11 Jul 2013 05:13:02 -0400 Received: by mail-pd0-f181.google.com with SMTP id 14so7330567pdj.12 for ; Thu, 11 Jul 2013 02:13:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=OtVVqn2tBX4aZLSTpKBg+yQFSdSGXWDGLUad333j9P0=; b=hpSvUsT4irb0TktWzvK9r64nN+PfzBmT2x8+iScxDQm2qVBThDWkq0+1lP1++ndxpQ yhVOUVImPPZbPB7EdME4yOr3Lq8pTzWv0Ykd/hd5lckpVtBAx2MsDrbJDcrQVm3COSgN K7fGhqZo8vrjcav6JSGNQXd3ecJBKpU+3xjDzG5knAfIB9YAr89i/SYbVQ2fo0MaUKUT OMK2Rpr1JW3dkuDYKpLnV02T3o2bKagw2mNPlg4BHZhqUpoxEpoCVi3nUFWMTdyyPOoE ijyAfg7AKYh1GgvTPjfipHDwKf6vFH+I0fYfm/+B2Sc+d8TdCROjHNH/0T5yDGW6sgBB bG0g== X-Received: by 10.68.244.73 with SMTP id xe9mr35520126pbc.119.1373533981248; Thu, 11 Jul 2013 02:13:01 -0700 (PDT) Received: from localhost ([183.37.203.123]) by mx.google.com with ESMTPSA id ix3sm38639379pbc.37.2013.07.11.02.12.56 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 11 Jul 2013 02:13:00 -0700 (PDT) From: Ming Lei To: Greg Kroah-Hartman Cc: 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, Ming Lei , devel@driverdev.osuosl.org Subject: [PATCH 48/50] staging: bcm: spin_lock in complete() cleanup Date: Thu, 11 Jul 2013 17:06:11 +0800 Message-Id: <1373533573-12272-49-git-send-email-ming.lei@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1373533573-12272-1-git-send-email-ming.lei@canonical.com> References: <1373533573-12272-1-git-send-email-ming.lei@canonical.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: devel@driverdev.osuosl.org Signed-off-by: Ming Lei --- drivers/staging/bcm/InterfaceRx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/bcm/InterfaceRx.c b/drivers/staging/bcm/InterfaceRx.c index 26f5bc7..00af901 100644 --- a/drivers/staging/bcm/InterfaceRx.c +++ b/drivers/staging/bcm/InterfaceRx.c @@ -47,6 +47,7 @@ static void read_bulk_callback(struct urb *urb) struct bcm_interface_adapter *psIntfAdapter = pRcb->psIntfAdapter; struct bcm_mini_adapter *Adapter = psIntfAdapter->psAdapter; struct bcm_leader *pLeader = urb->transfer_buffer; + unsigned long flags; if (unlikely(netif_msg_rx_status(Adapter))) pr_info(PFX "%s: rx urb status %d length %d\n", @@ -129,9 +130,9 @@ static void read_bulk_callback(struct urb *urb) (sizeof(struct bcm_leader)), pLeader->PLength); skb->len = pLeader->PLength + sizeof(USHORT); - spin_lock(&Adapter->control_queue_lock); + spin_lock_irqsave(&Adapter->control_queue_lock, flags); ENQUEUEPACKET(Adapter->RxControlHead,Adapter->RxControlTail,skb); - spin_unlock(&Adapter->control_queue_lock); + spin_unlock_irqretore(&Adapter->control_queue_lock, flags); atomic_inc(&Adapter->cntrlpktCnt); wake_up(&Adapter->process_rx_cntrlpkt);