On 2 February 2013 23:40, Grant Likely <grant.lik...@secretlab.ca> wrote: > static const VMStateDescription vmstate_smc91c111 = { > @@ -71,6 +76,8 @@ static const VMStateDescription vmstate_smc91c111 = { > VMSTATE_BUFFER_UNSAFE(data, smc91c111_state, 0, NUM_PACKETS * 2048), > VMSTATE_UINT8(int_level, smc91c111_state), > VMSTATE_UINT8(int_mask, smc91c111_state), > + VMSTATE_MDIO(mdio_bus, smc91c111_state), > + VMSTATE_MDIO_PHY(phy, smc91c111_state), > VMSTATE_END_OF_LIST() > }
If you're adding vmstate fields to an existing structure you need to either: (a) increment the .version_id field, and set .minimum_version_id field to the same value [and accept that old-to-new migration won't be possible, which is OK in this particular case as it's only used by ARM boards and I'm happy that we don't currently support cross version migration on ARM] (b) increment .version_id only, mark the new vmstate fields as only-from-version-N, and cope with what you get if an incoming migration hasn't got the fields. For a complicated thing like the phy I would suggest course (a) as the simplest approach. -- PMM