netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] r6040: only disable RX interrupt if napi_schedule_prep is successful
@ 2011-07-15 11:28 Michael Thalmeier
  2011-07-15 15:10 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Thalmeier @ 2011-07-15 11:28 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: netdev, linux-kernel, michael, Michael Thalmeier

When receiving the first RX interrupt before the internal call
to napi_schedule_prep is successful the RX interrupt gets disabled
and is never enabled again as the poll function never gets executed.

Signed-off-by: Michael Thalmeier <Michael.Thalmeier@sigmatek.at>
---
 drivers/net/r6040.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index 200a363..0ffec46 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -677,9 +677,11 @@ static irqreturn_t r6040_interrupt(int irq, void *dev_id)
 		if (status & RX_FIFO_FULL)
 			dev->stats.rx_fifo_errors++;
 
-		/* Mask off RX interrupt */
-		misr &= ~RX_INTS;
-		napi_schedule(&lp->napi);
+		if (likely(napi_schedule_prep(&lp->napi))) {
+			/* Mask off RX interrupt */
+			misr &= ~RX_INTS;
+			__napi_schedule(&lp->napi);
+		}
 	}
 
 	/* TX interrupt request */
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] r6040: only disable RX interrupt if napi_schedule_prep is successful
  2011-07-15 11:28 [PATCH 1/1] r6040: only disable RX interrupt if napi_schedule_prep is successful Michael Thalmeier
@ 2011-07-15 15:10 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-07-15 15:10 UTC (permalink / raw)
  To: Michael.Thalmeier; +Cc: florian, netdev, linux-kernel, michael

From: Michael Thalmeier <Michael.Thalmeier@sigmatek.at>
Date: Fri, 15 Jul 2011 13:28:26 +0200

> When receiving the first RX interrupt before the internal call
> to napi_schedule_prep is successful the RX interrupt gets disabled
> and is never enabled again as the poll function never gets executed.
> 
> Signed-off-by: Michael Thalmeier <Michael.Thalmeier@sigmatek.at>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-15 15:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-15 11:28 [PATCH 1/1] r6040: only disable RX interrupt if napi_schedule_prep is successful Michael Thalmeier
2011-07-15 15:10 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).