fix a race in ks8695_poll
fix a race at the end of NAPI processing in ks8695_poll() function. Signed-off-by:Figo.zhang <figo1802@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
3a22813a5a
commit
b96b894c51
@@ -575,9 +575,9 @@ static int ks8695_poll(struct napi_struct *napi, int budget)
|
|||||||
if (work_done < budget) {
|
if (work_done < budget) {
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
spin_lock_irqsave(&ksp->rx_lock, flags);
|
spin_lock_irqsave(&ksp->rx_lock, flags);
|
||||||
|
__napi_complete(napi);
|
||||||
/*enable rx interrupt*/
|
/*enable rx interrupt*/
|
||||||
writel(isr | mask_bit, KS8695_IRQ_VA + KS8695_INTEN);
|
writel(isr | mask_bit, KS8695_IRQ_VA + KS8695_INTEN);
|
||||||
__napi_complete(napi);
|
|
||||||
spin_unlock_irqrestore(&ksp->rx_lock, flags);
|
spin_unlock_irqrestore(&ksp->rx_lock, flags);
|
||||||
}
|
}
|
||||||
return work_done;
|
return work_done;
|
||||||
|
Reference in New Issue
Block a user