[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/13] usb-host-libusb: Detach kernel drivers ea
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH 03/13] usb-host-libusb: Detach kernel drivers earlier |
Date: |
Wed, 09 Oct 2013 10:55:39 +0200 |
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
[Qemu-devel] [PATCH 04/13] usb-hcd-xhci: Remove unused sstreamsm member from XHCIStreamContext, Hans de Goede, 2013/10/08
[Qemu-devel] [PATCH 05/13] usb-hcd-xhci: Remove unused cancelled member from XHCITransfer, Hans de Goede, 2013/10/08
[Qemu-devel] [PATCH 06/13] usb-hcd-xhci: Report completion of active transfer with CC_STOPPED on ep stop, Hans de Goede, 2013/10/08
[Qemu-devel] [PATCH 07/13] usb-hcd-xhci: Update endpoint context dequeue pointer for streams too, Hans de Goede, 2013/10/08
[Qemu-devel] [PATCH 08/13] usb: Add max_streams attribute to endpoint info, Hans de Goede, 2013/10/08
[Qemu-devel] [PATCH 09/13] usb: Add usb_device_alloc/free_streams, Hans de Goede, 2013/10/08
[Qemu-devel] [PATCH 10/13] xhci: Call usb_device_alloc/free_streams, Hans de Goede, 2013/10/08