*/
#include "qemu/osdep.h"
-#include "hw/hw.h"
+#include "qemu-common.h"
#include "hw/pci/pci.h"
+#include "hw/qdev-properties.h"
#include "sysemu/dma.h"
#include "sysemu/block-backend.h"
#include "hw/pci/msi.h"
#include "hw/pci/msix.h"
#include "qemu/iov.h"
+#include "qemu/module.h"
#include "hw/scsi/scsi.h"
#include "scsi/constants.h"
#include "trace.h"
#include "qapi/error.h"
#include "mfi.h"
+#include "migration/vmstate.h"
#define MEGASAS_VERSION_GEN1 "1.70"
#define MEGASAS_VERSION_GEN2 "1.80"
cmd->frame = NULL;
cmd->pa = 0;
cmd->pa_size = 0;
+ qemu_sglist_destroy(&cmd->qsg);
clear_bit(cmd->index, s->frame_map);
}
{
PCIDevice *pcid = PCI_DEVICE(s);
MegasasCmd *cmd = NULL;
- int frame_size = MFI_FRAME_SIZE * 16;
+ int frame_size = MEGASAS_MAX_SGE * sizeof(union mfi_sgl);
hwaddr frame_size_p = frame_size;
unsigned long index;
static void megasas_complete_command(MegasasCmd *cmd)
{
- qemu_sglist_destroy(&cmd->qsg);
cmd->iov_size = 0;
cmd->iov_offset = 0;