aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi/mptsas.c
diff options
context:
space:
mode:
authorCao jin <caoj.fnst@cn.fujitsu.com>2016-06-20 14:13:36 +0800
committerMichael S. Tsirkin <mst@redhat.com>2016-07-05 13:14:41 +0300
commit444dd1af1cdf430a437d2c9f06192b0bc94d1e10 (patch)
tree0b2fe2e1d719d58fb06a3d3cfb88b20131ec7555 /hw/scsi/mptsas.c
parentc0f2abff738ab83bd60da55b043a28c5ee664078 (diff)
mptsas: change msi property type
>From uint32 to enum OnOffAuto, and give it a shorter name. cc: Paolo Bonzini <pbonzini@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>
Diffstat (limited to 'hw/scsi/mptsas.c')
-rw-r--r--hw/scsi/mptsas.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c
index be88e161a9..40033c4399 100644
--- a/hw/scsi/mptsas.c
+++ b/hw/scsi/mptsas.c
@@ -1284,8 +1284,9 @@ static void mptsas_scsi_init(PCIDevice *dev, Error **errp)
memory_region_init_io(&s->diag_io, OBJECT(s), &mptsas_diag_ops, s,
"mptsas-diag", 0x10000);
- if (s->msi_available &&
+ if (s->msi != ON_OFF_AUTO_OFF &&
msi_init(dev, 0, 1, true, false) >= 0) {
+ /* TODO check for errors */
s->msi_in_use = true;
}
@@ -1403,7 +1404,7 @@ static const VMStateDescription vmstate_mptsas = {
static Property mptsas_properties[] = {
DEFINE_PROP_UINT64("sas_address", MPTSASState, sas_addr, 0),
/* TODO: test MSI support under Windows */
- DEFINE_PROP_BIT("msi", MPTSASState, msi_available, 0, true),
+ DEFINE_PROP_ON_OFF_AUTO("msi", MPTSASState, msi, ON_OFF_AUTO_AUTO),
DEFINE_PROP_END_OF_LIST(),
};