All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: Ayaz Abdulla <aabdulla@nvidia.com>,
	Manfred Spraul <manfred@colorfullife.com>,
	Jeff Garzik <jgarzik@pobox.com>, Andrew Morton <akpm@osdl.org>,
	netdev@vger.kernel.org
Subject: [PATCH 4/3] forcedeth: fix NAPI hang in IRQ.
Date: Thu, 27 Jul 2006 19:01:14 -0700	[thread overview]
Message-ID: <20060727190114.68bfd817@localhost> (raw)
In-Reply-To: <20060728015054.566221096@localhost>

Fix for NAPI hanging in interrupt. With NAPI, we only need one
iteration over the IRQ.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>

--- linux-2.6.orig/drivers/net/forcedeth.c	2006-07-27
18:58:21.000000000 -0700 +++ linux-2.6/drivers/net/forcedeth.c
2006-07-27 18:57:31.000000000 -0700 @@ -2422,10 +2422,11 @@
 						dev->name, events);
 		}
 #ifdef CONFIG_FORCEDETH_NAPI
-		if (netif_rx_schedule_prep(dev)) {
-			__netif_rx_schedule(dev);
+		if (events & NVREG_IRQ_RX_ALL) {
+			netif_rx_schedule(dev);
 			nv_disable_hw_interrupts(dev,
NVREG_IRQ_RX_ALL); }
+		return IRQ_HANDLED;
 #else
 		nv_rx_process(dev, dev->weight);
 		if (nv_alloc_rx(dev)) {
@@ -2434,7 +2435,6 @@
 				mod_timer(&np->oom_kick, jiffies +
OOM_REFILL); spin_unlock(&np->lock);
 		}
-#endif
 		if (i > max_interrupt_work) {
 			spin_lock(&np->lock);
 			/* disable interrupts on the nic */
@@ -2452,7 +2452,7 @@
 			spin_unlock(&np->lock);
 			break;
 		}
-
+#endif
 	}
 	dprintk(KERN_DEBUG "%s: nv_nic_irq completed\n", dev->name);
 

  reply	other threads:[~2006-07-28  2:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-28  1:50 [PATCH 0/3] forcedeth: patches Stephen Hemminger
2006-07-28  1:50 ` [PATCH 1/3] forcedeth: coding style cleanups Stephen Hemminger
2006-07-29  5:29   ` Jeff Garzik
2006-07-28  1:50 ` [PATCH 2/3] forcedeth: le32 annotation Stephen Hemminger
2006-07-28  1:50 ` [PATCH 3/3] forcdeth: NAPI support (rev3) Stephen Hemminger
2006-07-28  2:01   ` Stephen Hemminger [this message]
2006-07-29  4:10     ` [PATCH 4/3] forcedeth: fix NAPI hang in IRQ Andrew Morton
2006-07-29  5:30   ` [PATCH 3/3] forcdeth: NAPI support (rev3) Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060727190114.68bfd817@localhost \
    --to=shemminger@osdl.org \
    --cc=aabdulla@nvidia.com \
    --cc=akpm@osdl.org \
    --cc=jgarzik@pobox.com \
    --cc=manfred@colorfullife.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.