@@ -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);
Complete() will be run with interrupt enabled, so change to spin_lock_irqsave(). Cc: devel@driverdev.osuosl.org Signed-off-by: Ming Lei <ming.lei@canonical.com> --- drivers/staging/bcm/InterfaceRx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)