peterdelevoryas / rpms / qemu

Forked from rpms/qemu 2 years ago
Clone

Blame 0048-virtio-serial-pci-Allow-MSI-to-be-disabled.patch

Justin M. Forbes eff942
From 8a881734bccddf707a42ba2effff699b824d3c8f Mon Sep 17 00:00:00 2001
Justin M. Forbes eff942
From: Amit Shah <amit.shah@redhat.com>
Justin M. Forbes eff942
Date: Thu, 25 Feb 2010 18:41:16 +0530
Justin M. Forbes eff942
Subject: [PATCH] virtio-serial: pci: Allow MSI to be disabled
Justin M. Forbes eff942
Justin M. Forbes eff942
Michael noted we don't allow disabling of MSI for the virtio-serial-pci
Justin M. Forbes eff942
device. Fix that.
Justin M. Forbes eff942
Justin M. Forbes eff942
Upstream commit: 7b665b668aa92bf0bba696f085dff87539d95529
Justin M. Forbes eff942
Justin M. Forbes eff942
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Justin M. Forbes eff942
CC: "Michael S. Tsirkin" <mst@redhat.com>
Justin M. Forbes eff942
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Justin M. Forbes eff942
---
Justin M. Forbes eff942
 hw/virtio-pci.c |    6 +++---
Justin M. Forbes eff942
 1 files changed, 3 insertions(+), 3 deletions(-)
Justin M. Forbes eff942
Justin M. Forbes eff942
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
Justin M. Forbes eff942
index 9a02682..636c8c3 100644
Justin M. Forbes eff942
--- a/hw/virtio-pci.c
Justin M. Forbes eff942
+++ b/hw/virtio-pci.c
Justin M. Forbes eff942
@@ -598,8 +598,8 @@ static int virtio_serial_init_pci(PCIDevice *pci_dev)
Justin M. Forbes eff942
     if (!vdev) {
Justin M. Forbes eff942
         return -1;
Justin M. Forbes eff942
     }
Justin M. Forbes eff942
-    vdev->nvectors = proxy->nvectors ? proxy->nvectors
Justin M. Forbes eff942
-                                     : proxy->max_virtserial_ports + 1;
Justin M. Forbes eff942
+    vdev->nvectors = proxy->nvectors == -1 ? proxy->max_virtserial_ports + 1
Justin M. Forbes eff942
+                                           : proxy->nvectors;
Justin M. Forbes eff942
     virtio_init_pci(proxy, vdev,
Justin M. Forbes eff942
                     PCI_VENDOR_ID_REDHAT_QUMRANET,
Justin M. Forbes eff942
                     PCI_DEVICE_ID_VIRTIO_CONSOLE,
Justin M. Forbes eff942
@@ -683,7 +683,7 @@ static PCIDeviceInfo virtio_info[] = {
Justin M. Forbes eff942
         .init      = virtio_serial_init_pci,
Justin M. Forbes eff942
         .exit      = virtio_exit_pci,
Justin M. Forbes eff942
         .qdev.props = (Property[]) {
Justin M. Forbes eff942
-            DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 0),
Justin M. Forbes eff942
+            DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, -1),
Justin M. Forbes eff942
             DEFINE_PROP_HEX32("class", VirtIOPCIProxy, class_code, 0),
Justin M. Forbes eff942
             DEFINE_VIRTIO_COMMON_FEATURES(VirtIOPCIProxy, host_features),
Justin M. Forbes eff942
             DEFINE_PROP_UINT32("max_ports", VirtIOPCIProxy, max_virtserial_ports,
Justin M. Forbes eff942
-- 
Justin M. Forbes eff942
1.6.6.1
Justin M. Forbes eff942