Commit 9aa0a489 authored by Roland Dreier's avatar Roland Dreier

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: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Tested-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent c1f67a88
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment