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-changelog

[Xen-changelog] [linux-2.6.18-xen] pciback: disable MSI/MSI-X when reset

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] pciback: disable MSI/MSI-X when resetting device
From: "Xen patchbot-linux-2.6.18-xen" <patchbot@xxxxxxx>
Date: Thu, 10 Feb 2011 06:05:06 -0800
Delivery-date: Thu, 10 Feb 2011 06:05:17 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1297346342 0
# Node ID 2994d2997f9d035092f6cc3544ebe66d797b983a
# Parent  1128f2a18acfd4e8d0a7aad38afd107894399822
pciback: disable MSI/MSI-X when resetting device

In cases where the guest is abruptly killed and has not disabled
MSI/MSI-X interrupts we want to do that.

Otherwise when the guest is started up and enables MSI, we would
get a WARN() that the device already had been enabled.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 drivers/xen/pciback/pciback_ops.c |    8 ++++++++
 1 files changed, 8 insertions(+)

diff -r 1128f2a18acf -r 2994d2997f9d drivers/xen/pciback/pciback_ops.c
--- a/drivers/xen/pciback/pciback_ops.c Thu Feb 10 09:06:04 2011 +0000
+++ b/drivers/xen/pciback/pciback_ops.c Thu Feb 10 13:59:02 2011 +0000
@@ -22,6 +22,14 @@ void pciback_reset_device(struct pci_dev
 
        /* Disable devices (but not bridges) */
        if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) {
+#ifdef CONFIG_PCI_MSI
+               /* The guest could have been abruptly killed without
+                * disabling MSI/MSI-X interrupts.*/
+               if (dev->msix_enabled)
+                       pci_disable_msix(dev);
+               if (dev->msi_enabled)
+                       pci_disable_msi(dev);
+#endif
                pci_disable_device(dev);
 
                pci_write_config_word(dev, PCI_COMMAND, 0);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] pciback: disable MSI/MSI-X when resetting device, Xen patchbot-linux-2.6.18-xen <=