]> git.proxmox.com Git - qemu.git/commitdiff
msi: simplify write config a bit.
authorIsaku Yamahata <yamahata@valinux.co.jp>
Thu, 20 Jan 2011 07:21:39 +0000 (16:21 +0900)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 20 Jan 2011 13:33:18 +0000 (15:33 +0200)
use pci_device_deassert_intx().

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/msi.c

index f03f519a2e8affc4cbc2cf9c36ad71124ea8a64b..3dc3a24b779002b848301776220670f8b8b035f2 100644 (file)
--- a/hw/msi.c
+++ b/hw/msi.c
@@ -255,7 +255,6 @@ void msi_write_config(PCIDevice *dev, uint32_t addr, uint32_t val, int len)
     uint8_t log_max_vecs;
     unsigned int vector;
     uint32_t pending;
-    int i;
 
     if (!ranges_overlap(addr, len, dev->msi_cap, msi_cap_sizeof(flags))) {
         return;
@@ -296,9 +295,7 @@ void msi_write_config(PCIDevice *dev, uint32_t addr, uint32_t val, int len)
      *   from using its INTx# pin (if implemented) to request
      *   service (MSI, MSI-X, and INTx# are mutually exclusive).
      */
-    for (i = 0; i < PCI_NUM_PINS; ++i) {
-        qemu_set_irq(dev->irq[i], 0);
-    }
+    pci_device_deassert_intx(dev);
 
     /*
      * nr_vectors might be set bigger than capable. So clamp it.