Skip to content
  • Gerd Hoffmann's avatar
    usb core: add migration support · c1ecb40a
    Gerd Hoffmann authored
    
    
    Yes, seriously.  There is no migration support at all for usb devices.
    They loose state, especially the device address, and stop responding
    because of that.  Oops.
    
    Luckily there is so much broken usb hardware out there that the guest
    usually just kicks the device hard (via port reset and
    reinitialization), then continues without a hitch.  So we got away with
    that in a surprising high number of cases.
    
    The arrival of remote wakeup (which enables autosuspend support) changes
    that picture though.  The usb devices also forget that it they are
    supposed to wakeup, so they don't do that.  The host also doesn't notice
    the device stopped working in case it suspended the device and thus
    expects it waking up instead of polling it.  Result is that your mouse
    is dead.
    
    Lets start fixing that.  Add a vmstate struct for USBDevice.
    
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    c1ecb40a