summary refs log tree commit diff stats
path: root/hw/net/can/can_kvaser_pci.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2018-01-29 23:30:17 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2018-02-13 11:44:13 +0100
commita62ed5d10600762eef20e2d925ce9e3adf56b9f7 (patch)
tree30902b3c0f5ac83842d59a3fa5356b97e6532398 /hw/net/can/can_kvaser_pci.c
parente73e09481c6fc87a67fc3b3183d40aed6bb586ff (diff)
downloadfocaccia-qemu-a62ed5d10600762eef20e2d925ce9e3adf56b9f7.tar.gz
focaccia-qemu-a62ed5d10600762eef20e2d925ce9e3adf56b9f7.zip
hw/net/can: interrupt cleanup
Define two functions to update the interrupt state, and call them
on loadvm.  This removes the need to migrate the state as part of
vmstate_kvaser_pci.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/net/can/can_kvaser_pci.c')
-rw-r--r--hw/net/can/can_kvaser_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/net/can/can_kvaser_pci.c b/hw/net/can/can_kvaser_pci.c
index 2d77ef2938..5f82f4359a 100644
--- a/hw/net/can/can_kvaser_pci.c
+++ b/hw/net/can/can_kvaser_pci.c
@@ -264,10 +264,10 @@ static const VMStateDescription vmstate_kvaser_pci = {
     .minimum_version_id_old = 1,
     .fields = (VMStateField[]) {
         VMSTATE_PCI_DEVICE(dev, KvaserPCIState),
+        /* Load this before sja_state.  */
+        VMSTATE_UINT32(s5920_intcsr, KvaserPCIState),
         VMSTATE_STRUCT(sja_state, KvaserPCIState, 0, vmstate_can_sja,
                        CanSJA1000State),
-        VMSTATE_UINT32(s5920_intcsr, KvaserPCIState),
-        VMSTATE_UINT32(s5920_irqstate, KvaserPCIState),
         VMSTATE_END_OF_LIST()
     }
 };