x86: fix msi_free_irq().

1) We should invoke destroy_irq() before msix_put_fixmap().
2) destroy_irq() invokes mask_msi_irq() eventually, so we can remove
the duplicate mask operation in the 'if' statement here.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
This commit is contained in:
Keir Fraser committed 2009-08-27 10:13:13 +01:00
1 parent 4062d9c27b
commit fbed278604
1 file changed
+1 -4
+1 -4
View File
@@ -443,17 +443,14 @@ int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int irq)
int msi_free_irq(struct msi_desc *entry)
{
destroy_irq(entry->irq);
if ( entry->msi_attrib.type == PCI_CAP_ID_MSIX )
{
unsigned long start;
writel(1, entry->mask_base + PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET);
start = (unsigned long)entry->mask_base & ~(PAGE_SIZE - 1);
msix_put_fixmap(entry->dev, virt_to_fix(start));
}
list_del(&entry->list);
destroy_irq(entry->irq);
xfree(entry);
return 0;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.