diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-11-01 13:09:31 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-11-01 13:09:31 -0500 |
commit | 2ff6458116546ced7ce00cc39423ee30b1477e67 (patch) | |
tree | d15aa8e6a07862dbea9ad9d6886ad29696fbf9b2 | |
parent | 0ffcb2ca8d7508f0e60035a17f3a8e055a7a1b89 (diff) | |
parent | 39fba3ada9a9e36a29a40e1acddec0923839c39b (diff) | |
download | qemu-2ff6458116546ced7ce00cc39423ee30b1477e67.zip qemu-2ff6458116546ced7ce00cc39423ee30b1477e67.tar.gz qemu-2ff6458116546ced7ce00cc39423ee30b1477e67.tar.bz2 |
Merge remote-tracking branch 'kraxel/usb.29' into staging
-rw-r--r-- | hw/usb-hub.c | 5 | ||||
-rw-r--r-- | hw/usb-msd.c | 4 | ||||
-rw-r--r-- | usb-linux.c | 6 |
3 files changed, 9 insertions, 6 deletions
diff --git a/hw/usb-hub.c b/hw/usb-hub.c index 09c6516..3eb0f1a 100644 --- a/hw/usb-hub.c +++ b/hw/usb-hub.c @@ -127,8 +127,8 @@ static const USBDescDevice desc_device_hub = { static const USBDesc desc_hub = { .id = { - .idVendor = 0, - .idProduct = 0, + .idVendor = 0x0409, + .idProduct = 0x55aa, .bcdDevice = 0x0101, .iManufacturer = STR_MANUFACTURER, .iProduct = STR_PRODUCT, @@ -163,6 +163,7 @@ static void usb_hub_attach(USBPort *port1) } else { port->wPortStatus &= ~PORT_STAT_LOW_SPEED; } + usb_wakeup(&s->dev); } static void usb_hub_detach(USBPort *port1) diff --git a/hw/usb-msd.c b/hw/usb-msd.c index 1a0815a..b734177 100644 --- a/hw/usb-msd.c +++ b/hw/usb-msd.c @@ -162,8 +162,8 @@ static const USBDescDevice desc_device_high = { static const USBDesc desc = { .id = { - .idVendor = 0, - .idProduct = 0, + .idVendor = 0x46f4, /* CRC16() of "QEMU" */ + .idProduct = 0x0001, .bcdDevice = 0, .iManufacturer = STR_MANUFACTURER, .iProduct = STR_PRODUCT, diff --git a/usb-linux.c b/usb-linux.c index 7d4d1d7..f086d57 100644 --- a/usb-linux.c +++ b/usb-linux.c @@ -1349,7 +1349,7 @@ static int usb_host_close(USBHostDevice *dev) { int i; - if (dev->fd == -1 || !dev->dev.attached) { + if (dev->fd == -1) { return -1; } @@ -1367,7 +1367,9 @@ static int usb_host_close(USBHostDevice *dev) } async_complete(dev); dev->closing = 0; - usb_device_detach(&dev->dev); + if (dev->dev.attached) { + usb_device_detach(&dev->dev); + } ioctl(dev->fd, USBDEVFS_RESET); close(dev->fd); dev->fd = -1; |