All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Jeff Garzik <jeff@garzik.org>, Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ayaz Abdulla <aabdulla@nvidia.com>,
	"David S. Miller" <davem@davemloft.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	NetDev <netdev@vger.kernel.org>
Subject: [PATCH] forcedeth: don't clear nic_poll_irq too early
Date: Thu, 05 Feb 2009 21:00:30 -0800	[thread overview]
Message-ID: <498BC3EE.3070209@kernel.org> (raw)
In-Reply-To: <498BC3A8.9040203@kernel.org>


Impact: fix bug

for msix, we still need that flag to enable irq respectively

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 drivers/net/forcedeth.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Index: linux-2.6/drivers/net/forcedeth.c
===================================================================
--- linux-2.6.orig/drivers/net/forcedeth.c
+++ linux-2.6/drivers/net/forcedeth.c
@@ -4057,8 +4057,6 @@ static void nv_do_nic_poll(unsigned long
 			mask |= NVREG_IRQ_OTHER;
 		}
 	}
-	np->nic_poll_irq = 0;
-
 	/* disable_irq() contains synchronize_irq, thus no irq handler can run now */
 
 	if (np->recover_error) {
@@ -4096,11 +4094,11 @@ static void nv_do_nic_poll(unsigned long
 		}
 	}
 
-
 	writel(mask, base + NvRegIrqMask);
 	pci_push(base);
 
 	if (!using_multi_irqs(dev)) {
+		np->nic_poll_irq = 0;
 		if (nv_optimized(np))
 			nv_nic_irq_optimized(0, dev);
 		else
@@ -4111,18 +4109,22 @@ static void nv_do_nic_poll(unsigned long
 			enable_irq_lockdep(np->pci_dev->irq);
 	} else {
 		if (np->nic_poll_irq & NVREG_IRQ_RX_ALL) {
+			np->nic_poll_irq &= ~NVREG_IRQ_RX_ALL;
 			nv_nic_irq_rx(0, dev);
 			enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector);
 		}
 		if (np->nic_poll_irq & NVREG_IRQ_TX_ALL) {
+			np->nic_poll_irq &= ~NVREG_IRQ_TX_ALL;
 			nv_nic_irq_tx(0, dev);
 			enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector);
 		}
 		if (np->nic_poll_irq & NVREG_IRQ_OTHER) {
+			np->nic_poll_irq &= ~NVREG_IRQ_OTHER;
 			nv_nic_irq_other(0, dev);
 			enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector);
 		}
 	}
+
 }
 
 #ifdef CONFIG_NET_POLL_CONTROLLER

  reply	other threads:[~2009-02-06  5:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-06  4:59 [PATCH] forcedeth: make msi-x different name for rx-tx Yinghai Lu
2009-02-06  5:00 ` Yinghai Lu [this message]
2009-02-06  9:31   ` [PATCH] forcedeth: don't clear nic_poll_irq too early David Miller
2009-02-06  5:01 ` [PATCH] forcedeth: disable irq at first before schedule rx Yinghai Lu
2009-02-06  9:32   ` David Miller
2009-02-06  5:01 ` [PATCH] forcedeth: ck804 and mcp55 doesn't need timerirq Yinghai Lu
2009-02-06  9:32   ` David Miller
2009-02-06  5:02 ` [PATCH] forcedeth: enable msix to default Yinghai Lu
2009-02-06  9:32   ` David Miller
2009-02-06  9:31 ` [PATCH] forcedeth: make msi-x different name for rx-tx David Miller
2009-02-06 14:49 ` Ingo Molnar
2009-02-06 16:57   ` Yinghai Lu
2009-02-06 17:15     ` Ingo Molnar
2009-02-06 17:54       ` Yinghai Lu
2009-02-09 12:00         ` Ingo Molnar
2009-02-09 19:13           ` Yinghai Lu

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=498BC3EE.3070209@kernel.org \
    --to=yinghai@kernel.org \
    --cc=aabdulla@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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.