diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2010-12-08 17:46:23 +0900 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2010-12-09 12:48:18 +0200 |
commit | 4a9dd6658268a942a8ea230f950a951229355cbb (patch) | |
tree | 1273e979fefd46bbe01299a570221121d784bb12 /hw/pcie.c | |
parent | b1aeb92666d2fde413c34578b3b42bbfe5f2a506 (diff) | |
download | qemu-4a9dd6658268a942a8ea230f950a951229355cbb.tar.gz qemu-4a9dd6658268a942a8ea230f950a951229355cbb.tar.bz2 qemu-4a9dd6658268a942a8ea230f950a951229355cbb.zip |
pci: untangle pci/msi dependency
msi depends on pci but pci should not depend on msi.
The only dependency we have is a recent addition
of pci_msi_ functions, IMO they add little enough to
open-code in the small number of users.
Follow-up patches add more cleanups.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Diffstat (limited to 'hw/pcie.c')
-rw-r--r-- | hw/pcie.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -167,10 +167,12 @@ static void hotplug_event_notify(PCIDevice *dev) * The Port may optionally send an MSI when there are hot-plug events that * occur while interrupt generation is disabled, and interrupt generation is * subsequently enabled. */ - if (!pci_msi_enabled(dev)) { + if (msix_enabled(dev)) { + msix_notify(dev, pcie_cap_flags_get_vector(dev)); + } else if (msi_enabled(dev)) { + msi_notify(dev, pcie_cap_flags_get_vector(dev)); + } else { qemu_set_irq(dev->irq[dev->exp.hpev_intx], dev->exp.hpev_notified); - } else if (dev->exp.hpev_notified) { - pci_msi_notify(dev, pcie_cap_flags_get_vector(dev)); } } |