[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86: fix msi_free_irq().



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1251364393 -3600
# Node ID b63b1db5b388ef92bc1ecd709ddb0d357cf2d6b7
# Parent  442bc6f82cf3983d395a79d45b71a5ed7378995c
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@xxxxxxxxx>
---
 xen/arch/x86/msi.c |    5 +----
 1 files changed, 1 insertion(+), 4 deletions(-)

diff -r 442bc6f82cf3 -r b63b1db5b388 xen/arch/x86/msi.c
--- a/xen/arch/x86/msi.c        Thu Aug 27 10:12:41 2009 +0100
+++ b/xen/arch/x86/msi.c        Thu Aug 27 10:13:13 2009 +0100
@@ -443,17 +443,14 @@ int setup_msi_irq(struct pci_dev *dev, s
 
 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;
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.