mirror of https://gitee.com/openkylin/qemu.git
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>
This commit is contained in:
parent
c0f2abff73
commit
444dd1af1c
|
@ -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(),
|
||||
};
|
||||
|
||||
|
|
|
@ -27,7 +27,8 @@ struct MPTSASState {
|
|||
MemoryRegion diag_io;
|
||||
QEMUBH *request_bh;
|
||||
|
||||
uint32_t msi_available;
|
||||
/* properties */
|
||||
OnOffAuto msi;
|
||||
uint64_t sas_addr;
|
||||
|
||||
bool msi_in_use;
|
||||
|
|
Loading…
Reference in New Issue