When the mthca driver calls request_irq() to allocate interrupt resources, it 
uses
the fixed device name string "ib_mthca". When multiple IB cards are present in 
the system,
every instance of the resource is named "ib_mthca" in /proc/interrupts.
This can make it very confusing trying to work out exactly where IB interrupts 
are going and why.

The mthca driver has been modified to use the PCI name of the IB card
for the purpose of allocating interrupt resources.

Signed-off-by: Arputham Benjamin <[email protected]>
---
diff -rup a/drivers/infiniband/hw/mthca/mthca_dev.h 
b/drivers/infiniband/hw/mthca/mthca_dev.h
--- a/drivers/infiniband/hw/mthca/mthca_dev.h   2009-06-29 18:03:30.640012711 
-0700
+++ b/drivers/infiniband/hw/mthca/mthca_dev.h   2009-06-29 18:05:45.871951427 
-0700
@@ -356,6 +356,7 @@ struct mthca_dev {
        struct ib_ah         *sm_ah[MTHCA_MAX_PORTS];
        spinlock_t            sm_lock;
        u8                    rate[MTHCA_MAX_PORTS];
+       char                  irq_name[MTHCA_NUM_EQ][IB_DEVICE_NAME_MAX];
 };

 #ifdef CONFIG_INFINIBAND_MTHCA_DEBUG
diff -rup a/drivers/infiniband/hw/mthca/mthca_eq.c 
b/drivers/infiniband/hw/mthca/mthca_eq.c
--- a/drivers/infiniband/hw/mthca/mthca_eq.c    2009-06-29 18:06:20.016944802 
-0700
+++ b/drivers/infiniband/hw/mthca/mthca_eq.c    2009-06-30 17:05:17.953297035 
-0700
@@ -864,21 +864,27 @@ int mthca_init_eq_table(struct mthca_dev
                };

                for (i = 0; i < MTHCA_NUM_EQ; ++i) {
+                       snprintf(&dev->irq_name[i][0], IB_DEVICE_NAME_MAX,
+                                "%...@pci:%s", eq_name[i],
+                                pci_name(dev->pdev));
                        err = request_irq(dev->eq_table.eq[i].msi_x_vector,
                                          mthca_is_memfree(dev) ?
                                          mthca_arbel_msi_x_interrupt :
                                          mthca_tavor_msi_x_interrupt,
-                                         0, eq_name[i], dev->eq_table.eq + i);
+                                         0, &dev->irq_name[i][0],
+                                         dev->eq_table.eq + i);
                        if (err)
                                goto err_out_cmd;
                        dev->eq_table.eq[i].have_irq = 1;
                }
        } else {
+               snprintf(&dev->irq_name, IB_DEVICE_NAME_MAX,
+                        DRV_NAME "@pci:%s", pci_name(dev->pdev));
                err = request_irq(dev->pdev->irq,
                                  mthca_is_memfree(dev) ?
                                  mthca_arbel_interrupt :
                                  mthca_tavor_interrupt,
-                                 IRQF_SHARED, DRV_NAME, dev);
+                                 IRQF_SHARED, &dev->irq_name, dev);
                if (err)
                        goto err_out_cmd;
                dev->eq_table.have_irq = 1;


_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to