WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] linux/PCI/MSI-X: Don't disable when it was never ena

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux/PCI/MSI-X: Don't disable when it was never enabled
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Fri, 27 Nov 2009 10:26:26 +0000
Delivery-date: Fri, 27 Nov 2009 02:27:27 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
This is the MSI-X counterpart for c/s 945.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- sle10sp3-2009-11-27.orig/drivers/pci/msi-xen.c      2009-11-27 
09:36:21.000000000 +0100
+++ sle10sp3-2009-11-27/drivers/pci/msi-xen.c   2009-11-27 09:40:40.000000000 
+0100
@@ -728,6 +741,7 @@ int pci_enable_msix(struct pci_dev* dev,
                        printk("get %x from pci_frontend_enable_msix\n", ret);
                        return ret;
                }
+               dev->msix_enabled = 1;
                msi_dev_entry->default_irq = temp;
 
                for (i = 0; i < nvec; i++) {
@@ -805,6 +819,11 @@ void pci_disable_msix(struct pci_dev* de
                return;
        if (!dev)
                return;
+       if (!dev->msix_enabled) {
+               printk(KERN_INFO "PCI: %s: Device did not enabled MSI-X.\n",
+                      pci_name(dev));
+               return;
+       }
 
 #ifdef CONFIG_XEN_PCIDEV_FRONTEND
        if (!is_initial_xendomain()) {
@@ -822,6 +841,7 @@ void pci_disable_msix(struct pci_dev* de
                }
 
                dev->irq = msi_dev_entry->default_irq;
+               dev->msix_enabled = 0;
                return;
        }
 #endif




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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux/PCI/MSI-X: Don't disable when it was never enabled, Jan Beulich <=