staging: vt6656: remove RX complete locking.
authorMalcolm Priestley <tvboxspy@gmail.com>
Sun, 27 Sep 2015 08:17:44 +0000 (09:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 02:19:54 +0000 (04:19 +0200)
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 <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/usbpipe.c

index a5912dde9b31e1bff79322f3238e4ba202247185..c975c3b870938eb582d022785e9a0bdb0144e7fc 100644 (file)
@@ -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)) {