[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 12/60] intel_hda: do not call msi_reset when only d
From: |
Michael Tokarev |
Subject: |
[Qemu-stable] [PATCH 12/60] intel_hda: do not call msi_reset when only device state needs resetting |
Date: |
Mon, 4 Feb 2013 14:40:22 +0400 |
Commit 8e729e3b521d9 "intel-hda: Fix reset of MSI function"
(applied to 1.1.1 as 0ec39075710) added a call to msi_reset()
into intel_hda_reset() function. But this function is called
not only from PCI bus reset method, but also from device init
method (intel_hda_set_g_ctl()), and there, we should not reset
msi state. For this, split intel_hda_reset() into two halves,
one common part with device reset, and one with msi reset,
intel_hda_reset_msi(), which also calls the common part, for
the bus method.
This is only needed for 1.1.x series, since in 1.2+, MSI reset
is called in proper places by the PCI code already.
Signed-off-by: Michael Tokarev <address@hidden>
Cc: Jan Kiszka <address@hidden>
Cc: Michael S. Tsirkin <address@hidden>
Cc: address@hidden
---
hw/intel-hda.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/hw/intel-hda.c b/hw/intel-hda.c
index e38861e..da61323 100644
--- a/hw/intel-hda.c
+++ b/hw/intel-hda.c
@@ -1107,9 +1107,6 @@ static void intel_hda_reset(DeviceState *dev)
DeviceState *qdev;
HDACodecDevice *cdev;
- if (d->msi) {
- msi_reset(&d->pci);
- }
intel_hda_regs_reset(d);
d->wall_base_ns = qemu_get_clock_ns(vm_clock);
@@ -1122,6 +1119,15 @@ static void intel_hda_reset(DeviceState *dev)
intel_hda_update_irq(d);
}
+static void intel_hda_reset_msi(DeviceState *dev)
+{
+ IntelHDAState *d = DO_UPCAST(IntelHDAState, pci.qdev, dev);
+ if (d->msi) {
+ msi_reset(&d->pci);
+ }
+ intel_hda_reset(dev);
+}
+
static int intel_hda_init(PCIDevice *pci)
{
IntelHDAState *d = DO_UPCAST(IntelHDAState, pci, pci);
@@ -1261,7 +1267,7 @@ static void intel_hda_class_init(ObjectClass *klass, void
*data)
k->revision = 1;
k->class_id = PCI_CLASS_MULTIMEDIA_HD_AUDIO;
dc->desc = "Intel HD Audio Controller";
- dc->reset = intel_hda_reset;
+ dc->reset = intel_hda_reset_msi;
dc->vmsd = &vmstate_intel_hda;
dc->props = intel_hda_properties;
}
--
1.7.10.4
- [Qemu-stable] [PATCH 51/60] vmdk: Fix data corruption bug in WRITE and READ handling, (continued)
- [Qemu-stable] [PATCH 51/60] vmdk: Fix data corruption bug in WRITE and READ handling, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 59/60] target-xtensa: fix ITLB/DTLB page protection flags, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 55/60] arm_boot: Change initrd load address to "halfway through RAM", Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 34/60] memory: fix rendering of a region obscured by another, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 13/60] usb-audio: fix usb version, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 37/60] target-sparc64: disable VGA cirrus, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 14/60] fpu/softfloat.c: Return correctly signed values from uint64_to_float32, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 52/60] uhci: Don't queue up packets after one with the SPD flag set, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 08/60] eepro100: Fix network hang when rx buffers run out, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 53/60] hw/qxl: qxl_send_events: nop if stopped, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 12/60] intel_hda: do not call msi_reset when only device state needs resetting,
Michael Tokarev <=
- [Qemu-stable] [PATCH 24/60] qxl: always update displaysurface on resize, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 36/60] PPC: Bamboo: Fix memory size DT property, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 17/60] net: notify iothread after flushing queue, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 31/60] linux-user: fix emulation of getdents, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 44/60] qcow2: Fix refcount table size calculation, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 43/60] qcow2: Fix avail_sectors in cluster allocation code, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 06/60] fix doc of using raw values with sendkey, Michael Tokarev, 2013/02/04
- [Qemu-stable] [PATCH 48/60] ide: Fix crash with too long PRD, Michael Tokarev, 2013/02/04
- Re: [Qemu-stable] Patch queue for qemu-1.1.3 stable release, Doug Goldstein, 2013/02/04
- Re: [Qemu-stable] [Qemu-devel] Patch queue for qemu-1.1.3 stable release, Michael Tokarev, 2013/02/19