===================================================================
@@ -1840,6 +1840,17 @@
free(dev->filter_rules);
}
+static void usbredir_handle_attach(USBDevice *udev)
+{
+ assert(udev != NULL);
+ assert(udev->attached);
+ assert(udev->state == USB_STATE_ATTACHED);
+
+ if (udev->speed == USB_SPEED_SUPER && (udev->port->speedmask & USB_SPEED_MASK_SUPER)) {
+ udev->state = USB_STATE_DEFAULT;
+ }
+}
+
static int usbredir_check_filter(USBRedirDevice *dev)
{
if (dev->interface_info.interface_count == NO_INTERFACE_INFO) {
@@ -3014,6 +3025,7 @@
uc->init = usbredir_initfn;
uc->product_desc = "USB Redirection Device";
uc->handle_destroy = usbredir_handle_destroy;
+ uc->handle_attach = usbredir_handle_attach;
uc->cancel_packet = usbredir_cancel_packet;
uc->handle_reset = usbredir_handle_reset;
uc->handle_data = usbredir_handle_data;