diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-05-14 10:07:23 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-05-14 10:07:23 -0500 |
commit | 7a85d1cf1cf9b2b9379c35f1b672d1661e2d8132 (patch) | |
tree | f195391b0a02d6beb04ea87be056b14dce156909 /hw | |
parent | caa3d6d37b596e5fb59d4f7e845b84fa8f583fe7 (diff) | |
parent | a2498f76b8ddd4011645e54faf6eb9281bd6f401 (diff) |
Merge remote-tracking branch 'kraxel/usb.50' into staging
* kraxel/usb.50:
usb-host: handle guest-issued clear halt
Diffstat (limited to 'hw')
-rw-r--r-- | hw/usb/host-linux.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c index 048f8ffa8b..a95b0eda55 100644 --- a/hw/usb/host-linux.c +++ b/hw/usb/host-linux.c @@ -1058,6 +1058,15 @@ static int usb_host_handle_control(USBDevice *dev, USBPacket *p, ret = usb_host_set_interface(s, index, value); trace_usb_host_req_emulated(s->bus_num, s->addr, p, ret); return ret; + + case EndpointOutRequest | USB_REQ_CLEAR_FEATURE: + if (value == 0) { /* clear halt */ + int pid = (index & USB_DIR_IN) ? USB_TOKEN_IN : USB_TOKEN_OUT; + ioctl(s->fd, USBDEVFS_CLEAR_HALT, &index); + clear_halt(s, pid, index & 0x0f); + trace_usb_host_req_emulated(s->bus_num, s->addr, p, 0); + return 0; + } } /* The rest are asynchronous */ |