diff options
author | Hannes Reinecke <hare@suse.de> | 2014-10-29 13:00:12 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-10-31 11:29:00 +0100 |
commit | 96f8f23a1e900796494a54e8b56610e1a7db2a89 (patch) | |
tree | 66d3cfc7acbc57b850e73cf9a333b4a405e887e4 /hw | |
parent | 8d72db68fe7b45c7e01f815c4ac3e6c7ac0e26c1 (diff) | |
download | qemu-96f8f23a1e900796494a54e8b56610e1a7db2a89.zip qemu-96f8f23a1e900796494a54e8b56610e1a7db2a89.tar.gz qemu-96f8f23a1e900796494a54e8b56610e1a7db2a89.tar.bz2 |
megasas: Ignore duplicate init_firmware commands
The windows driver is sending several init_firmware commands
when in MSI-X mode. It is, however, using only the first
queue. So disregard any additional init_firmware commands
until the HBA is reset.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/scsi/megasas.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 57d5288..ed4cc1b 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -610,16 +610,19 @@ static int megasas_init_firmware(MegasasState *s, MegasasCmd *cmd) { PCIDevice *pcid = PCI_DEVICE(s); uint32_t pa_hi, pa_lo; - hwaddr iq_pa, initq_size; - struct mfi_init_qinfo *initq; + hwaddr iq_pa, initq_size = sizeof(struct mfi_init_qinfo); + struct mfi_init_qinfo *initq = NULL; uint32_t flags; int ret = MFI_STAT_OK; + if (s->reply_queue_pa) { + trace_megasas_initq_mapped(s->reply_queue_pa); + goto out; + } pa_lo = le32_to_cpu(cmd->frame->init.qinfo_new_addr_lo); pa_hi = le32_to_cpu(cmd->frame->init.qinfo_new_addr_hi); iq_pa = (((uint64_t) pa_hi << 32) | pa_lo); trace_megasas_init_firmware((uint64_t)iq_pa); - initq_size = sizeof(*initq); initq = pci_dma_map(pcid, iq_pa, &initq_size, 0); if (!initq || initq_size != sizeof(*initq)) { trace_megasas_initq_map_failed(cmd->index); |