From patchwork Sun Sep 27 08:17:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 7273131 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1E06FBF90C for ; Sun, 27 Sep 2015 08:18:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4CF552090E for ; Sun, 27 Sep 2015 08:18:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A6E32096C for ; Sun, 27 Sep 2015 08:18:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755087AbbI0ISv (ORCPT ); Sun, 27 Sep 2015 04:18:51 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:33291 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754854AbbI0ISa (ORCPT ); Sun, 27 Sep 2015 04:18:30 -0400 Received: by wiclk2 with SMTP id lk2so68254495wic.0 for ; Sun, 27 Sep 2015 01:18:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=y64ay5vvyYEpxjT5PvmXHNDn8zgWnCzbPEq0bZ8TV18=; b=vO0aIjZdFN5BhNrSS68rhG0SNWCCfvPmaLB1216FumRkK7mQ6HNo8EDlfzBJn711Gd WpS251aKSv3qGoRiXQJpNQVu3qWqejlQlCL20L2c/R9P3rtnRLAnCwUhzmIH3dAsLW+6 RYvwl62DGMccvKnLHzRRkivs2ws696YGZe+Ud+rxa/6evIp9Tgf+QpEqlStazsBBHniU WPiznTQW3gjqHT9kpr1UD4b0+OhRSlqXhyJivPOXRq9jaxszreghaM8kdsv6gddP6FcK g5WTUkkniG69pbuxxJW1whPdyI4oWBqkl94dze8YO60BUwqfmrz3AchOZmj9Q01/EOIY YWwA== X-Received: by 10.180.182.84 with SMTP id ec20mr12651755wic.42.1443341909637; Sun, 27 Sep 2015 01:18:29 -0700 (PDT) Received: from tipsey.3.home (188.31.176.126.threembb.co.uk. [188.31.176.126]) by smtp.gmail.com with ESMTPSA id o10sm11949040wia.4.2015.09.27.01.18.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 27 Sep 2015 01:18:29 -0700 (PDT) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley Subject: [PATCH 6/6] staging: vt6656: remove RX complete locking. Date: Sun, 27 Sep 2015 09:17:44 +0100 Message-Id: <1443341864-2756-6-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1443341864-2756-1-git-send-email-tvboxspy@gmail.com> References: <1443341864-2756-1-git-send-email-tvboxspy@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_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 The lock in vnt_submit_rx_urb_complete is blocked by TX activity. The lock comes from a time when RX needed to be synchronized with other parts of the driver because the WLAN API was in driver. Since this is now dealt with in mac80211 the lock is unnecessary. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/usbpipe.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c index a5912dd..c975c3b 100644 --- a/drivers/staging/vt6656/usbpipe.c +++ b/drivers/staging/vt6656/usbpipe.c @@ -168,7 +168,6 @@ static void vnt_submit_rx_urb_complete(struct urb *urb) { struct vnt_rcb *rcb = urb->context; struct vnt_private *priv = rcb->priv; - unsigned long flags; switch (urb->status) { case 0: @@ -184,8 +183,6 @@ static void vnt_submit_rx_urb_complete(struct urb *urb) } if (urb->actual_length) { - spin_lock_irqsave(&priv->lock, flags); - if (vnt_rx_data(priv, rcb, urb->actual_length)) { rcb->skb = dev_alloc_skb(priv->rx_buf_sz); if (!rcb->skb) { @@ -193,7 +190,6 @@ static void vnt_submit_rx_urb_complete(struct urb *urb) "Failed to re-alloc rx skb\n"); rcb->in_use = false; - spin_unlock_irqrestore(&priv->lock, flags); return; } } else { @@ -203,8 +199,6 @@ static void vnt_submit_rx_urb_complete(struct urb *urb) urb->transfer_buffer = skb_put(rcb->skb, skb_tailroom(rcb->skb)); - - spin_unlock_irqrestore(&priv->lock, flags); } if (usb_submit_urb(urb, GFP_ATOMIC)) {