[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 11 Nov 2008 12:37:08 -0500
From: Neil Horman <nhorman@...driver.com>
To: Michael Chan <mchan@...adcom.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"jgarzik@...ox.com" <jgarzik@...ox.com>,
"'davem@...emloft.net'" <davem@...emloft.net>
Subject: Re: [PATCH] bnx2: fix poll_controller method so that proper
structures are passed and all rx queues are checked
On Tue, Nov 11, 2008 at 09:09:10AM -0800, Michael Chan wrote:
>
> On Tue, 2008-11-11 at 08:46 -0800, Neil Horman wrote:
> > On Tue, Nov 11, 2008 at 07:12:13AM -0800, Michael Chan wrote:
> > > Neil Horman wrote:
> > > > 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]);
> > >
> > > Neil, thanks for the patch.
> > >
> > > We should probably pass bp->irq_tbl[i].vector as 1st parameter
> > > for correctness, even though it doesn't really matter in this
> > > case since it is not used by bnx2_interrupt().
> > >
> > I thought we overwrote pdev->irq with the value from irq_tbl when we registered
> > for msi interrupts?
> >
>
> In MSI and INTA mode, we store pdev->irq into irq_tbl[0].vector. In
> MSI-X mode, we'll have multiple vectors in the irq_tbl entries and
> pdev->irq is no longer relevant. So to be correct when we have multiple
> vectors, the irq_tbl values should be used.
>
> Thanks.
>
Copy that. Here you go, followon patch to change how we pass the irq vector to
bnx2_interrupt. Doesn't do anything super-usefull, but good for the sake of
correctness
Regards
Neil
Signed-off-by: Neil Horman <nhorman@...driver.com>
bnx2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 9e1f0e3..cad8b7a 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -7208,7 +7208,7 @@ poll_bnx2(struct net_device *dev)
disable_irq(bp->pdev->irq);
for (i = 0; i < bp->irq_nvecs; i++)
- bnx2_interrupt(bp->pdev->irq, &bp->bnx2_napi[i]);
+ bnx2_interrupt(bp->irq_tbl[i].vector, &bp->bnx2_napi[i]);
enable_irq(bp->pdev->irq);
}
#endif
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
/****************************************************
* Neil Horman <nhorman@...driver.com>
* Software Engineer, Red Hat
****************************************************/
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists