summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-09-25 16:55:28 +0200
committerAurelien Jarno <aurelien@aurel32.net>2009-09-25 17:40:16 +0200
commit2c3a5ddb267e61c0018e8216147327e6ae14e828 (patch)
treefe6e853322ef10c938669723168942b771cfdcf6
parent402bbdb4ff2d0359fab06239c4c815937007c092 (diff)
downloadqemu-2c3a5ddb267e61c0018e8216147327e6ae14e828.tar.gz
qemu-2c3a5ddb267e61c0018e8216147327e6ae14e828.tar.bz2
qemu-2c3a5ddb267e61c0018e8216147327e6ae14e828.zip
unbreak usb pass-through on linux.
Changes: * Re-add the 'dev->fd = fd;' line which the qdev patches dropped by mistake. * call qdev_init() so the newly created usb device is plugged into a usb port and thus actually visible to the guest. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
-rw-r--r--usb-linux.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usb-linux.c b/usb-linux.c
index c434e4f8a7..2b7b09214e 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -922,6 +922,7 @@ static USBDevice *usb_host_device_open_addr(int bus_num, int addr, const char *p
dev->bus_num = bus_num;
dev->addr = addr;
+ dev->fd = fd;
/* read the device description */
dev->descr_len = read(fd, dev->descr, sizeof(dev->descr));
@@ -979,6 +980,7 @@ static USBDevice *usb_host_device_open_addr(int bus_num, int addr, const char *p
hostdev_link(dev);
+ qdev_init(&d->qdev);
return (USBDevice *) dev;
fail: