Commit 29b02373 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: lock changes: s_nsBulkInUsbIoCompleteRead.

Use spin_lock_irqsave/spin_unlock_irqrestore
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c91b1869
...@@ -474,6 +474,7 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb) ...@@ -474,6 +474,7 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
{ {
struct vnt_rcb *rcb = urb->context; struct vnt_rcb *rcb = urb->context;
struct vnt_private *priv = rcb->pDevice; struct vnt_private *priv = rcb->pDevice;
unsigned long flags;
int re_alloc_skb = false; int re_alloc_skb = false;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkInUsbIoCompleteRead\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkInUsbIoCompleteRead\n");
...@@ -493,23 +494,23 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb) ...@@ -493,23 +494,23 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
} }
if (urb->actual_length) { if (urb->actual_length) {
spin_lock(&priv->lock); spin_lock_irqsave(&priv->lock, flags);
if (RXbBulkInProcessData(priv, rcb, urb->actual_length) == true) if (RXbBulkInProcessData(priv, rcb, urb->actual_length) == true)
re_alloc_skb = true; re_alloc_skb = true;
spin_unlock(&priv->lock); spin_unlock_irqrestore(&priv->lock, flags);
} }
rcb->Ref--; rcb->Ref--;
if (rcb->Ref == 0) { if (rcb->Ref == 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RxvFreeNormal %d\n", DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RxvFreeNormal %d\n",
priv->NumRecvFreeList); priv->NumRecvFreeList);
spin_lock(&priv->lock); spin_lock_irqsave(&priv->lock, flags);
RXvFreeRCB(rcb, re_alloc_skb); RXvFreeRCB(rcb, re_alloc_skb);
spin_unlock(&priv->lock); spin_unlock_irqrestore(&priv->lock, flags);
} }
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment