[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/35] megasas: Ignore duplicate init_firmware comman
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 11/35] megasas: Ignore duplicate init_firmware commands |
Date: |
Fri, 31 Oct 2014 18:25:49 +0100 |
From: Hannes Reinecke <address@hidden>
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 <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/scsi/megasas.c | 9 ++++++---
trace-events | 1 +
2 files changed, 7 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);
diff --git a/trace-events b/trace-events
index 2ceb8e4..a8b25a1 100644
--- a/trace-events
+++ b/trace-events
@@ -697,6 +697,7 @@ lm32_uart_irq_state(int level) "irq state %d"
megasas_init_firmware(uint64_t pa) "pa %" PRIx64 " "
megasas_init_queue(uint64_t queue_pa, int queue_len, uint64_t head, uint64_t
tail, uint32_t flags) "queue at %" PRIx64 " len %d head %" PRIx64 " tail %"
PRIx64 " flags %x"
megasas_initq_map_failed(int frame) "scmd %d: failed to map queue"
+megasas_initq_mapped(uint64_t pa) "queue already mapped at %" PRIx64 ""
megasas_initq_mismatch(int queue_len, int fw_cmds) "queue size %d max fw cmds
%d"
megasas_qf_found(unsigned int index, uint64_t pa) "mapped frame %x pa %"
PRIx64 ""
megasas_qf_new(unsigned int index, void *cmd) "return new frame %x cmd %p"
--
1.8.3.1
- [Qemu-devel] [PULL 01/35] rules.mak: Allow .mo-objs and .mo-cflags in -y variables, (continued)
- [Qemu-devel] [PULL 01/35] rules.mak: Allow .mo-objs and .mo-cflags in -y variables, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 02/35] ui: Use the new ".mo-cflags" rule syntax for SDL_CFLAGS, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 03/35] scsi: Rename scsi_*_length() to scsi_*_xfer(), add scsi_cdb_length(), Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 04/35] megasas: fixup MFI_DCMD_LD_LIST_QUERY, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 05/35] megasas: simplify trace event messages, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 06/35] megasas: fixup device mapping, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 07/35] megasas: add MegaRAID SAS 2108 emulation, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 08/35] megasas: Fix typo in megasas_dcmd_ld_get_list(), Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 09/35] megasas: Decode register names, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 10/35] megasas: Clear unit attention on initial reset, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 11/35] megasas: Ignore duplicate init_firmware commands,
Paolo Bonzini <=
- [Qemu-devel] [PULL 12/35] megasas: Implement DCMD_CLUSTER_RESET_LD, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 13/35] megasas: Update queue logging, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 14/35] megasas: Rework frame queueing algorithm, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 15/35] megasas: Fixup MSI-X handling, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 16/35] -machine vmport=off: Allow disabling of VMWare ioport emulation, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 17/35] Add skip_dump flag to ignore memory region during dump, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 18/35] vl.c: Fix Coverity complaining for vmstate_dump_file, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 19/35] kvmvapic: patch_instruction fix, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 20/35] iscsi: Refuse to open as writable if the LUN is write protected, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 21/35] virtio-scsi: Fix memory leak when realize failed, Paolo Bonzini, 2014/10/31