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

Re: [Xen-devel] [PATCH] Dont call msi_unmap_pirq() if did not enabled msi



On 2009-11-18 14:23, Jiang, Yunhong wrote:
> Yes, we need keep the msi disable/enable information for frontend also, now 
> it is only kept in backend side. It is a issue introduced by us from 
> beginning.

Thanks for your information, patch may like below?


diff -r c5c40e80bd7d drivers/pci/msi-xen.c
--- a/drivers/pci/msi-xen.c     Fri Nov 13 22:01:54 2009 +0000
+++ b/drivers/pci/msi-xen.c     Mon Nov 23 10:21:17 2009 +0800
@@ -618,6 +618,7 @@
                        return ret;
 
                dev->irq = evtchn_map_pirq(-1, dev->irq);
+               dev->msi_enabled = 1;
                msi_dev_entry->default_irq = temp;
 
                return ret;
@@ -662,6 +663,11 @@
 
 #ifdef CONFIG_XEN_PCIDEV_FRONTEND
        if (!is_initial_xendomain()) {
+               if (!(dev->msi_enabled)) {
+                       printk(KERN_INFO "PCI: %s: Device did not enabled 
MSI.\n",
+                              pci_name(dev));
+                       return;
+               }
                evtchn_map_pirq(dev->irq, 0);
                pci_frontend_disable_msi(dev);
                dev->irq = msi_dev_entry->default_irq;
@@ -673,6 +679,12 @@
        if (!pos)
                return;
 
+       if (!(dev->msi_enabled)) {
+               printk(KERN_INFO "PCI: %s: Device did not enabled MSI.\n",
+                      pci_name(dev));
+               return;
+       }
+ 
        pirq = dev->irq;
        /* Restore dev->irq to its default pin-assertion vector */
        dev->irq = msi_dev_entry->default_irq;



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


 


Rackspace

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