usb-host: scan for usb devices when the vm starts
commitc06c68c928edd36eb56baa0d2db065bbec28af27
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 14 Nov 2012 14:51:18 +0000 (14 15:51 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 16 Nov 2012 10:27:05 +0000 (16 11:27 +0100)
tree753a30b791cbf147e5b02639f844f267dbb29e14
parent155de06f2480219ea99916ddb9ad61b622b8f51f
usb-host: scan for usb devices when the vm starts

Commit a844ed842d9a9d929645c09ae0f52f753d7a02e0 leads to usb-host
detecting devices not right after qemu startup because the guest
isn't running yet.  Instead they are found on the first of the
regular usb device poll runs.  Which is too late for seabios to see
them, so booting from usb sticks fails.

Fix this by adding a vm state change handler which triggers a device
scan when the vm is started.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/host-linux.c