aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/arm/ks8695net.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/net/arm/ks8695net.c b/drivers/net/arm/ks8695net.c
index 0073d198715b..e15451a85107 100644
--- a/drivers/net/arm/ks8695net.c
+++ b/drivers/net/arm/ks8695net.c
@@ -433,24 +433,16 @@ ks8695_rx_irq(int irq, void *dev_id)
433{ 433{
434 struct net_device *ndev = (struct net_device *)dev_id; 434 struct net_device *ndev = (struct net_device *)dev_id;
435 struct ks8695_priv *ksp = netdev_priv(ndev); 435 struct ks8695_priv *ksp = netdev_priv(ndev);
436 unsigned long status;
437
438 unsigned long mask_bit = 1 << ks8695_get_rx_enable_bit(ksp);
439 436
440 spin_lock(&ksp->rx_lock); 437 spin_lock(&ksp->rx_lock);
441 438
442 status = readl(KS8695_IRQ_VA + KS8695_INTST); 439 if (napi_schedule_prep(&ksp->napi)) {
443 440 unsigned long status = readl(KS8695_IRQ_VA + KS8695_INTEN);
444 /*clean rx status bit*/ 441 unsigned long mask_bit = 1 << ks8695_get_rx_enable_bit(ksp);
445 writel(status | mask_bit , KS8695_IRQ_VA + KS8695_INTST); 442 /*disable rx interrupt*/
446 443 status &= ~mask_bit;
447 if (status & mask_bit) { 444 writel(status , KS8695_IRQ_VA + KS8695_INTEN);
448 if (napi_schedule_prep(&ksp->napi)) { 445 __napi_schedule(&ksp->napi);
449 /*disable rx interrupt*/
450 status &= ~mask_bit;
451 writel(status , KS8695_IRQ_VA + KS8695_INTEN);
452 __napi_schedule(&ksp->napi);
453 }
454 } 446 }
455 447
456 spin_unlock(&ksp->rx_lock); 448 spin_unlock(&ksp->rx_lock);