qemu/hw/usb
Hans de Goede 5af35d7fec usb-host-libusb: Fix reset handling
The guest will issue an initial device reset when the device is attached, but
since the current usb-host-libusb code only actually does the reset when
udev->configuration != 0, and on attach the device is not yet configured,
the reset gets ignored. This means that the device gets passed to the guest
in an unknown state, which is not good.

The udev->configuration check is there because of the release / claim
interfaces done around the libusb_device_reset call, but these are not
necessary. If interfaces are claimed when libusb_device_reset gets called
libusb will release + reclaim them itself.

The usb_host_ep_update call also is not necessary. If the reset succeeds the
original config and interface alt settings will be restored.

Last if the reset fails, that means the device has either disconnected or
morphed into an another device and has been completely re-enumerated,
so it is treated by the host as a new device and our handle is invalid,
so on reset failure we need to call usb_host_nodev().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-10-22 16:28:48 +02:00
..
Makefile.objs Remove dev-bluetooth.c dependency from vl.c 2013-09-10 11:14:42 +02:00
bus.c usb: sanity check setup_index+setup_len in post_load 2013-09-10 11:14:41 +02:00
ccid-card-emulated.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
ccid-card-passthru.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
ccid.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
combined-packet.c usb: Fix iovec memleak on combined-packet free 2013-09-19 11:28:40 +02:00
core.c usb: Also reset max_packet_size on ep_reset 2013-09-19 11:28:40 +02:00
desc.c usb: add serial bus property 2013-06-24 08:41:07 +02:00
desc.h usb: split packet result into actual_length + status 2012-11-08 18:41:46 +01:00
dev-audio.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
dev-bluetooth.c Remove dev-bluetooth.c dependency from vl.c 2013-09-10 11:14:42 +02:00
dev-hid.c usb/dev-hid: Modified usb-tablet category from Misc to Input 2013-09-02 11:06:20 +02:00
dev-hub.c Revert "usb-hub: report status changes only once" 2013-09-02 11:06:20 +02:00
dev-network.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
dev-serial.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
dev-smartcard-reader.c qdev: Pass size to qbus_create_inplace() 2013-08-30 21:15:35 +02:00
dev-storage.c scsi: Pass size to scsi_bus_new() 2013-08-30 20:14:39 +02:00
dev-uas.c Merge remote-tracking branch 'kraxel/usb.88' into staging 2013-09-03 12:31:30 -05:00
dev-wacom.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
hcd-ehci-pci.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
hcd-ehci-sysbus.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
hcd-ehci.c ehci: save device pointer in EHCIState 2013-09-10 11:14:42 +02:00
hcd-ehci.h ehci: save device pointer in EHCIState 2013-09-10 11:14:42 +02:00
hcd-musb.c usb: Pass size to usb_bus_new() 2013-08-30 20:14:39 +02:00
hcd-ohci.c pci-ohci: Add missing 'break' in ohci_service_td 2013-10-02 22:55:28 +04:00
hcd-uhci.c usb: Pass size to usb_bus_new() 2013-08-30 20:14:39 +02:00
hcd-xhci.c xhci: Fix memory leak on xhci_disable_ep 2013-09-19 11:28:40 +02:00
host-legacy.c usb-host: move legacy cmd line bits 2013-02-19 12:30:05 +01:00
host-libusb.c usb-host-libusb: Fix reset handling 2013-10-22 16:28:48 +02:00
host-stub.c usb-host: remove usb_host_device_close 2013-02-19 12:30:05 +01:00
host.h usb-host: move legacy cmd line bits 2013-02-19 12:30:05 +01:00
libhw.c dma: eliminate DMAContext 2013-06-20 16:39:52 +02:00
quirks-ftdi-ids.h usbredir: Add support for buffered bulk input (v2) 2013-01-08 10:56:58 +01:00
quirks-pl2303-ids.h usbredir: Add support for buffered bulk input (v2) 2013-01-08 10:56:58 +01:00
quirks.c usbredir: Add support for buffered bulk input (v2) 2013-01-08 10:56:58 +01:00
quirks.h usbredir: Add support for buffered bulk input (v2) 2013-01-08 10:56:58 +01:00
redirect.c aio / timers: Switch entire codebase to the new timer API 2013-08-22 19:14:24 +02:00