netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bnx2: fix poll_controller method so that proper structures are passed and all rx queues are checked
@ 2008-11-11 14:00 Neil Horman
  2008-11-11 14:43 ` Andy Gospodarek
  2008-11-11 15:12 ` Michael Chan
  0 siblings, 2 replies; 10+ messages in thread
From: Neil Horman @ 2008-11-11 14:00 UTC (permalink / raw)
  To: mchan, netdev, jgarzik; +Cc: nhorman

Hey-
	I noted recently that bnx2 had a few problems with its poll_controller
method:

1) It passes a net_device structure to bnx2_interrupt, but bnx2_interrupt
expects a bnx2_napi structure.

2) bnx2_interrupt never checks all its rx queues, so theres no guarantee that
we'll see incomming frames.

This patch should fix both those problems

Regards
Neil

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>


 bnx2.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 430d430..9e1f0e3 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -7203,10 +7203,12 @@ bnx2_change_mtu(struct net_device *dev, int new_mtu)
 static void
 poll_bnx2(struct net_device *dev)
 {
+	int i;
 	struct bnx2 *bp = netdev_priv(dev);
 
 	disable_irq(bp->pdev->irq);
-	bnx2_interrupt(bp->pdev->irq, dev);
+	for (i = 0; i < bp->irq_nvecs; i++)
+		bnx2_interrupt(bp->pdev->irq, &bp->bnx2_napi[i]);
 	enable_irq(bp->pdev->irq);
 }
 #endif
-- 
/****************************************************
 * Neil Horman <nhorman@tuxdriver.com>
 * Software Engineer, Red Hat
 ****************************************************/

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

end of thread, other threads:[~2008-11-13  1:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-11 14:00 [PATCH] bnx2: fix poll_controller method so that proper structures are passed and all rx queues are checked Neil Horman
2008-11-11 14:43 ` Andy Gospodarek
2008-11-11 15:12 ` Michael Chan
2008-11-11 16:46   ` Neil Horman
2008-11-11 17:09     ` Michael Chan
2008-11-11 17:37       ` Neil Horman
2008-11-11 17:59         ` Michael Chan
2008-11-11 20:58           ` Neil Horman
2008-11-13  0:23             ` David Miller
2008-11-13  1:09               ` Neil Horman

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).