Hi Hannes,
Am 29.10.2014 um 08:53 schrieb Hannes Reinecke:
> The 2108 chip supports MSI and MSI-X, so update the emulation
> to support both chips.
>
> Signed-off-by: Hannes Reinecke <[email protected]>
> ---
> hw/scsi/megasas.c | 218
> +++++++++++++++++++++++++++++++++++++++++------
> hw/scsi/mfi.h | 7 ++
> include/hw/pci/pci_ids.h | 1 +
> 3 files changed, 201 insertions(+), 25 deletions(-)
>
> diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
> index 1041e3d..00c1d5c 100644
> --- a/hw/scsi/megasas.c
> +++ b/hw/scsi/megasas.c
[...]
> @@ -2151,7 +2212,7 @@ static void megasas_scsi_reset(DeviceState *dev)
> megasas_soft_reset(s);
> }
>
> -static const VMStateDescription vmstate_megasas = {
> +static VMStateDescription vmstate_megasas_gen1 = {
Why are you dropping const? I don't spot a modification.
Same question below; otherwise looks fine.
Regards,
Andreas
> .name = "megasas",
> .version_id = 0,
> .minimum_version_id = 0,
> @@ -2169,6 +2230,25 @@ static const VMStateDescription vmstate_megasas = {
> }
> };
>
> +static VMStateDescription vmstate_megasas_gen2 = {
> + .name = "megasas-gen2",
> + .version_id = 0,
> + .minimum_version_id = 0,
> + .minimum_version_id_old = 0,
> + .fields = (VMStateField[]) {
> + VMSTATE_PCIE_DEVICE(parent_obj, MegasasState),
> + VMSTATE_MSIX(parent_obj, MegasasState),
> +
> + VMSTATE_INT32(fw_state, MegasasState),
> + VMSTATE_INT32(intr_mask, MegasasState),
> + VMSTATE_INT32(doorbell, MegasasState),
> + VMSTATE_UINT64(reply_queue_pa, MegasasState),
> + VMSTATE_UINT64(consumer_pa, MegasasState),
> + VMSTATE_UINT64(producer_pa, MegasasState),
> + VMSTATE_END_OF_LIST()
> + }
> +};
> +
> static void megasas_scsi_uninit(PCIDevice *d)
> {
> MegasasState *s = MEGASAS(d);
[snip]
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg