@@ -485,6 +485,7 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
int bIndicateReceive = false;
int bReAllocSkb = false;
int status;
+ unsigned long flags;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkInUsbIoCompleteRead\n");
status = urb->status;
@@ -515,18 +516,18 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
STAvUpdateUSBCounter(&pDevice->scStatistic.USB_BulkInStat, status);
if (bIndicateReceive) {
- spin_lock(&pDevice->lock);
+ spin_lock_irqsave(&pDevice->lock, flags);
if (RXbBulkInProcessData(pDevice, pRCB, bytesRead) == true)
bReAllocSkb = true;
- spin_unlock(&pDevice->lock);
+ spin_unlock_irqrestore(&pDevice->lock, flags);
}
pRCB->Ref--;
if (pRCB->Ref == 0)
{
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RxvFreeNormal %d \n",pDevice->NumRecvFreeList);
- spin_lock(&pDevice->lock);
+ spin_lock_irqsave(&pDevice->lock, flags);
RXvFreeRCB(pRCB, bReAllocSkb);
- spin_unlock(&pDevice->lock);
+ spin_unlock_irqrestore(&pDevice->lock, flags);
}
return;
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/vt6656/usbpipe.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)