All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Cao jin <caoj.fnst@cn.fujitsu.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Marcel Apfelbaum <marcel@redhat.com>
Subject: [Qemu-devel] [PULL v2 21/30] intel-hda: change msi property type
Date: Tue, 5 Jul 2016 18:47:15 +0300	[thread overview]
Message-ID: <20160705184715-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1467733400-17206-1-git-send-email-mst@redhat.com>

From: Cao jin <caoj.fnst@cn.fujitsu.com>

>From uint32 to enum OnOffAuto.

cc: Gerd Hoffmann <kraxel@redhat.com>
cc: Michael S. Tsirkin <mst@redhat.com>
cc: Markus Armbruster <armbru@redhat.com>
cc: Marcel Apfelbaum <marcel@redhat.com>

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 hw/audio/intel-hda.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index 098b17d..4e19e8b 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -191,7 +191,7 @@ struct IntelHDAState {
 
     /* properties */
     uint32_t debug;
-    uint32_t msi;
+    OnOffAuto msi;
     bool old_msi_addr;
 };
 
@@ -256,7 +256,7 @@ static void intel_hda_update_int_sts(IntelHDAState *d)
 
 static void intel_hda_update_irq(IntelHDAState *d)
 {
-    int msi = d->msi && msi_enabled(&d->pci);
+    bool msi = msi_enabled(&d->pci);
     int level;
 
     intel_hda_update_int_sts(d);
@@ -1143,7 +1143,8 @@ static void intel_hda_realize(PCIDevice *pci, Error **errp)
     memory_region_init_io(&d->mmio, OBJECT(d), &intel_hda_mmio_ops, d,
                           "intel-hda", 0x4000);
     pci_register_bar(&d->pci, 0, 0, &d->mmio);
-    if (d->msi) {
+    if (d->msi != ON_OFF_AUTO_OFF) {
+         /* TODO check for errors */
         msi_init(&d->pci, d->old_msi_addr ? 0x50 : 0x60, 1, true, false);
     }
 
@@ -1235,7 +1236,7 @@ static const VMStateDescription vmstate_intel_hda = {
 
 static Property intel_hda_properties[] = {
     DEFINE_PROP_UINT32("debug", IntelHDAState, debug, 0),
-    DEFINE_PROP_UINT32("msi", IntelHDAState, msi, 1),
+    DEFINE_PROP_ON_OFF_AUTO("msi", IntelHDAState, msi, ON_OFF_AUTO_AUTO),
     DEFINE_PROP_BOOL("old_msi_addr", IntelHDAState, old_msi_addr, false),
     DEFINE_PROP_END_OF_LIST(),
 };
-- 
MST

  parent reply	other threads:[~2016-07-05 15:47 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1467733400-17206-1-git-send-email-mst@redhat.com>
2016-07-05 15:46 ` [Qemu-devel] [PULL v2 01/30] xen: fix ram init regression Michael S. Tsirkin
2016-07-05 15:46   ` Michael S. Tsirkin
2016-07-05 15:46 ` [Qemu-devel] [PULL v2 02/30] hw/ppc: realize the PCI root bus as part of mac99 init Michael S. Tsirkin
2016-07-05 15:46 ` [Qemu-devel] [PULL v2 03/30] hw/pci: delay bus_master_enable_region initialization Michael S. Tsirkin
2016-07-05 15:46 ` [Qemu-devel] [PULL v2 04/30] q35: allow dynamic sysbus Michael S. Tsirkin
2016-07-05 15:46 ` [Qemu-devel] [PULL v2 05/30] hw/iommu: enable iommu with -device Michael S. Tsirkin
2016-07-05 15:46 ` [Qemu-devel] [PULL v2 06/30] machine: remove iommu property Michael S. Tsirkin
2016-07-05 15:46 ` [Qemu-devel] [PULL v2 07/30] piix: Set I440FXState member pci_info.w32 in one place Michael S. Tsirkin
2016-07-05 15:46 ` [Qemu-devel] [PULL v2 08/30] pc: Eliminate PcPciInfo Michael S. Tsirkin
2016-07-05 15:46 ` [Qemu-devel] [PULL v2 09/30] virtio: revert host notifiers to old semantics Michael S. Tsirkin
2016-07-05 15:46 ` [Qemu-devel] [PULL v2 10/30] virtio: set low features early on load Michael S. Tsirkin
2016-07-05 15:46 ` [Qemu-devel] [PULL v2 11/30] Revert "virtio-net: unbreak self announcement and guest offloads after migration" Michael S. Tsirkin
2016-07-05 15:46 ` [Qemu-devel] [PULL v2 12/30] pci_register_bar: cleanup Michael S. Tsirkin
2016-07-05 15:46 ` [Qemu-devel] [PULL v2 13/30] log: Clean up misuse of Range for -dfilter Michael S. Tsirkin
2016-07-05 15:46 ` [Qemu-devel] [PULL v2 14/30] range: Eliminate direct Range member access Michael S. Tsirkin
2016-07-05 15:46 ` [Qemu-devel] [PULL v2 15/30] range: Replace internal representation of Range Michael S. Tsirkin
2016-07-05 15:47 ` [Qemu-devel] [PULL v2 16/30] log: Permit -dfilter 0..0xffffffffffffffff Michael S. Tsirkin
2016-07-05 15:47 ` [Qemu-devel] [PULL v2 17/30] tests: acpi: add CPU hotplug testcase Michael S. Tsirkin
2016-07-05 15:47 ` [Qemu-devel] [PULL v2 18/30] tests: add APIC.cphp and DSDT.cphp blobs Michael S. Tsirkin
2016-07-05 15:47 ` [Qemu-devel] [PULL v2 19/30] change pvscsi_init_msi() type to void Michael S. Tsirkin
2016-07-05 15:47 ` [Qemu-devel] [PULL v2 20/30] usb xhci: change msi/msix property type Michael S. Tsirkin
2016-07-05 15:47 ` Michael S. Tsirkin [this message]
2016-07-05 15:47 ` [Qemu-devel] [PULL v2 22/30] mptsas: change msi " Michael S. Tsirkin
2016-07-05 15:47 ` [Qemu-devel] [PULL v2 23/30] megasas: change msi/msix " Michael S. Tsirkin
2016-07-05 15:47 ` [Qemu-devel] [PULL v2 24/30] pci bridge dev: change msi " Michael S. Tsirkin
2016-07-05 15:47 ` [Qemu-devel] [PULL v2 25/30] pci: Convert msi_init() to Error and fix callers to check it Michael S. Tsirkin
2016-07-05 15:47 ` [Qemu-devel] [PULL v2 26/30] megasas: remove unnecessary megasas_use_msi() Michael S. Tsirkin
2016-07-05 15:47 ` [Qemu-devel] [PULL v2 27/30] mptsas: remove unnecessary internal msi state flag Michael S. Tsirkin
2016-07-26  5:01   ` Amit Shah
2016-07-26  7:29     ` Cao jin
2016-07-26 11:18       ` Amit Shah
2016-07-26 13:10         ` Michael S. Tsirkin
2016-07-05 15:47 ` [Qemu-devel] [PULL v2 28/30] vmxnet3: " Michael S. Tsirkin
2016-07-05 15:47 ` [Qemu-devel] [PULL v2 29/30] e1000e: " Michael S. Tsirkin
2016-07-05 15:47 ` [Qemu-devel] [PULL v2 30/30] vmw_pvscsi: " Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160705184715-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=armbru@redhat.com \
    --cc=caoj.fnst@cn.fujitsu.com \
    --cc=kraxel@redhat.com \
    --cc=marcel@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.