mirror of
https://github.com/qemu/qemu.git
synced 2025-08-15 22:31:15 +00:00
Merge remote-tracking branch 'kraxel/usb.29' into staging
This commit is contained in:
commit
2ff6458116
@ -127,8 +127,8 @@ static const USBDescDevice desc_device_hub = {
|
|||||||
|
|
||||||
static const USBDesc desc_hub = {
|
static const USBDesc desc_hub = {
|
||||||
.id = {
|
.id = {
|
||||||
.idVendor = 0,
|
.idVendor = 0x0409,
|
||||||
.idProduct = 0,
|
.idProduct = 0x55aa,
|
||||||
.bcdDevice = 0x0101,
|
.bcdDevice = 0x0101,
|
||||||
.iManufacturer = STR_MANUFACTURER,
|
.iManufacturer = STR_MANUFACTURER,
|
||||||
.iProduct = STR_PRODUCT,
|
.iProduct = STR_PRODUCT,
|
||||||
@ -163,6 +163,7 @@ static void usb_hub_attach(USBPort *port1)
|
|||||||
} else {
|
} else {
|
||||||
port->wPortStatus &= ~PORT_STAT_LOW_SPEED;
|
port->wPortStatus &= ~PORT_STAT_LOW_SPEED;
|
||||||
}
|
}
|
||||||
|
usb_wakeup(&s->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void usb_hub_detach(USBPort *port1)
|
static void usb_hub_detach(USBPort *port1)
|
||||||
|
@ -162,8 +162,8 @@ static const USBDescDevice desc_device_high = {
|
|||||||
|
|
||||||
static const USBDesc desc = {
|
static const USBDesc desc = {
|
||||||
.id = {
|
.id = {
|
||||||
.idVendor = 0,
|
.idVendor = 0x46f4, /* CRC16() of "QEMU" */
|
||||||
.idProduct = 0,
|
.idProduct = 0x0001,
|
||||||
.bcdDevice = 0,
|
.bcdDevice = 0,
|
||||||
.iManufacturer = STR_MANUFACTURER,
|
.iManufacturer = STR_MANUFACTURER,
|
||||||
.iProduct = STR_PRODUCT,
|
.iProduct = STR_PRODUCT,
|
||||||
|
@ -1349,7 +1349,7 @@ static int usb_host_close(USBHostDevice *dev)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (dev->fd == -1 || !dev->dev.attached) {
|
if (dev->fd == -1) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1367,7 +1367,9 @@ static int usb_host_close(USBHostDevice *dev)
|
|||||||
}
|
}
|
||||||
async_complete(dev);
|
async_complete(dev);
|
||||||
dev->closing = 0;
|
dev->closing = 0;
|
||||||
|
if (dev->dev.attached) {
|
||||||
usb_device_detach(&dev->dev);
|
usb_device_detach(&dev->dev);
|
||||||
|
}
|
||||||
ioctl(dev->fd, USBDEVFS_RESET);
|
ioctl(dev->fd, USBDEVFS_RESET);
|
||||||
close(dev->fd);
|
close(dev->fd);
|
||||||
dev->fd = -1;
|
dev->fd = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user