diff options
author | Roland Dreier <rolandd@cisco.com> | 2009-06-14 00:14:09 +0200 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2009-06-14 00:14:09 +0200 |
commit | 9aa0a489d909af0cc36c41d3061ef956c7442ce2 (patch) | |
tree | e973b5748c54060325ba1dd90ab0ce8ccdc66195 /drivers/infiniband | |
parent | IB/mthca: Add module parameter for number of MTTs per segment (diff) | |
download | linux-9aa0a489d909af0cc36c41d3061ef956c7442ce2.tar.xz linux-9aa0a489d909af0cc36c41d3061ef956c7442ce2.zip |
IB/mthca: Don't double-free IRQs when falling back from MSI-X to INTx
When both MSI-X and legacy INTx fail to generate an interrupt, the
driver frees the MSI-X interrupts twice. Fix this by clearing the
have_irq flag for the MSI-X interrupts when they are freed the first
time.
Reported-by: Yinghai Lu <yhlu.kernel@gmail.com>
Tested-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_eq.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_eq.c b/drivers/infiniband/hw/mthca/mthca_eq.c index 28f0e0c40d7d..90e4e450a120 100644 --- a/drivers/infiniband/hw/mthca/mthca_eq.c +++ b/drivers/infiniband/hw/mthca/mthca_eq.c @@ -641,9 +641,11 @@ static void mthca_free_irqs(struct mthca_dev *dev) if (dev->eq_table.have_irq) free_irq(dev->pdev->irq, dev); for (i = 0; i < MTHCA_NUM_EQ; ++i) - if (dev->eq_table.eq[i].have_irq) + if (dev->eq_table.eq[i].have_irq) { free_irq(dev->eq_table.eq[i].msi_x_vector, dev->eq_table.eq + i); + dev->eq_table.eq[i].have_irq = 0; + } } static int mthca_map_reg(struct mthca_dev *dev, |