[ofa-general] [PATCH 06/10] cxgb3 - fix netpoll hanlder
Steve Wise
swise at opengridcomputing.com
Fri Jun 29 14:28:22 PDT 2007
cxgb3 - fix netpoll hanlder
Fix netpoll handler to work with line interrupt, msi and msi-x.
Signed-off-by: Divy Le Ray <divy at chelsio.com>
Signed-off-by: Jeff Garzik <jeff at garzik.org>
---
drivers/net/cxgb3/cxgb3_main.c | 16 +++++++++++++---
drivers/net/cxgb3/sge.c | 1 -
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index 475c428..f8b52dc 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -2071,10 +2071,20 @@ #ifdef CONFIG_NET_POLL_CONTROLLER
static void cxgb_netpoll(struct net_device *dev)
{
struct adapter *adapter = dev->priv;
- struct sge_qset *qs = dev2qset(dev);
+ struct port_info *pi = netdev_priv(dev);
+ int qidx;
- t3_intr_handler(adapter, qs->rspq.polling) (adapter->pdev->irq,
- adapter);
+ for (qidx = pi->first_qset; qidx < pi->first_qset + pi->nqsets; qidx++) {
+ struct sge_qset *qs = &adapter->sge.qs[qidx];
+ void *source;
+
+ if (adapter->flags & USING_MSIX)
+ source = qs;
+ else
+ source = adapter;
+
+ t3_intr_handler(adapter, qs->rspq.polling) (0, source);
+ }
}
#endif
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c
index 090dc1d..e80b2fd 100644
--- a/drivers/net/cxgb3/sge.c
+++ b/drivers/net/cxgb3/sge.c
@@ -2212,7 +2212,6 @@ irqreturn_t t3_sge_intr_msix_napi(int ir
struct sge_rspq *q = &qs->rspq;
spin_lock(&q->lock);
- BUG_ON(napi_is_scheduled(qs->netdev));
if (handle_responses(adap, q) < 0)
q->unhandled_irqs++;
More information about the general
mailing list