]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
cxgb3 - fix netpoll hanlder
authorDivy Le Ray <divy@chelsio.com>
Wed, 30 May 2007 17:01:34 +0000 (10:01 -0700)
committerJeff Garzik <jeff@garzik.org>
Wed, 20 Jun 2007 23:16:58 +0000 (19:16 -0400)
Fix netpoll handler to work with line interrupt, msi and msi-x.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/cxgb3/cxgb3_main.c
drivers/net/cxgb3/sge.c

index 1b20f4060e2d7a1fbdb00b9154d88103a4127625..d8a1f5452c51513092a2504548a6c8998d038a39 100644 (file)
@@ -2071,10 +2071,20 @@ static void vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
 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
 
index eaa7dace418296b1661247dde4276c53ef8e8d56..a60ec4d4707c50c2919bf2f99cd5f5051f3d483a 100644 (file)
@@ -2217,7 +2217,6 @@ irqreturn_t t3_sge_intr_msix_napi(int irq, void *cookie)
        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++;