diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-03-02 21:27:08 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-03-07 12:28:02 +0100 |
commit | 0454b611bb129ada92d16cfb9bec5fd6e1df5ab0 (patch) | |
tree | b623671a756ea54ded75a88bf568ca88867fb2b0 | |
parent | 27a9476cf75c4e147cb7d8c10c415928b3791b91 (diff) |
usb-redir: Set ep type and interface
Since we don't use usb_desc.c we need to do this ourselves. This fixes
iso transfers no longer working for USB 2 devices due to the ep->type
check in ehci.c
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | usb-redir.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/usb-redir.c b/usb-redir.c index 755492f379..a87de6e348 100644 --- a/usb-redir.c +++ b/usb-redir.c @@ -1122,6 +1122,7 @@ static void usbredir_device_disconnect(void *priv) for (i = 0; i < MAX_ENDPOINTS; i++) { QTAILQ_INIT(&dev->endpoint[i].bufpq); } + usb_ep_init(&dev->dev); dev->interface_info.interface_count = 0; } @@ -1148,6 +1149,7 @@ static void usbredir_ep_info(void *priv, struct usb_redir_ep_info_header *ep_info) { USBRedirDevice *dev = priv; + struct USBEndpoint *usb_ep; int i; for (i = 0; i < MAX_ENDPOINTS; i++) { @@ -1172,7 +1174,13 @@ static void usbredir_ep_info(void *priv, default: ERROR("Received invalid endpoint type\n"); usbredir_device_disconnect(dev); + return; } + usb_ep = usb_ep_get(&dev->dev, + (i & 0x10) ? USB_TOKEN_IN : USB_TOKEN_OUT, + i & 0x0f); + usb_ep->type = dev->endpoint[i].type; + usb_ep->ifnum = dev->endpoint[i].interface; } } |