On Di, 2013-10-08 at 21:58 +0200, Hans de Goede wrote: > If we detach the kernel drivers on the first set_config, then they will > be still attached when the device gets its initial reset. Causing the drivers > to re-initialize the device after the reset, dirtying the device state.
> @@ -1051,7 +1055,6 @@ static void usb_host_set_config(USBHostDevice *s, int > config, USBPacket *p) > trace_usb_host_set_config(s->bus_num, s->addr, config); > > usb_host_release_interfaces(s); > - usb_host_detach_kernel(s); > rc = libusb_set_configuration(s->dh, config); > if (rc != 0) { > usb_host_libusb_error("libusb_set_configuration", rc); Sure we can safely remove the detach_kernel here? Assuming we have a device with multiple configurations, each configuration has a different set of interfaces, guest switches from one config to another. Do we correctly unbind kernel / claim interfaces then? Handling this correctly was the reason to do the kernel unbind in response to the guests set_config instead of host_open btw, although I can see the issues the late unbind introduces. cheers, Gerd