qemu/hw/usb
Zhang Shuaiyi a4055d8586 nec-usb-xhci: set the device state to USB_STATE_DEFAULT
This patch is a rough fix to "hw/usb/core.c:401: usb_handle_packet:
 Assertion `dev->state == 3' failed.". Qemu will crash when a usb3
device redirect to Windows7 VM via nec-usb-xhci.

In extensible-host-controler-interface-usb-xhci.pdf P94(4.6.5
Address Device):
    • If the Block Set Address Request (BSR) flag = ‘1’
        • If the slot is in the Enabled state:
            ...
            • Set the Slot State in the Output Slot Context to Default.

BSR = ‘1’: Enabled state to Default state; BSR = ‘0’: Default state
to Addressed state. Try to call usb_device_reset to set device state
to USB_STATE_DEFAULT in xhci_address_slot wether bsr is zero.

Signed-off-by: Zhang Shuaiyi <zhang_syi@massclouds.com>
Message-id: 1467258640-11921-1-git-send-email-zhang_syi@massclouds.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-07-12 10:23:59 +02:00
..
bus.c usb: Add QOM property "attached". 2016-06-22 12:53:26 +02:00
ccid-card-emulated.c event-notifier: Add "is_external" parameter 2016-04-22 16:43:56 +02:00
ccid-card-passthru.c Passthru CCID card: QOMify 2016-02-11 15:15:47 +03:00
ccid.h
combined-packet.c usb: Clean up includes 2016-01-29 15:07:23 +00:00
core.c usb: check RNDIS message length 2016-02-23 10:38:00 +01:00
desc-msos.c usb: Clean up includes 2016-01-29 15:07:23 +00:00
desc.c usb: Clean up includes 2016-01-29 15:07:23 +00:00
desc.h all: Clean up includes 2016-02-23 12:43:05 +00:00
dev-audio.c usb: Clean up includes 2016-01-29 15:07:23 +00:00
dev-bluetooth.c usb: Clean up includes 2016-01-29 15:07:23 +00:00
dev-hid.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
dev-hub.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
dev-mtp.c usb-mtp: fix usb_mtp_get_device_info so that libmtp on the guest doesn't complain 2016-05-11 10:33:49 +02:00
dev-network.c hw/usb/dev-network.c: Use ldl_le_p() and stl_le_p() 2016-06-13 13:18:51 +02:00
dev-serial.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
dev-smartcard-reader.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
dev-storage.c usb-bot: hotplug support 2016-06-22 12:53:26 +02:00
dev-uas.c usb-uas: hotplug support 2016-06-22 12:53:26 +02:00
dev-wacom.c usb: Clean up includes 2016-01-29 15:07:23 +00:00
hcd-ehci-pci.c usb: Clean up includes 2016-01-29 15:07:23 +00:00
hcd-ehci-sysbus.c usb: Clean up includes 2016-01-29 15:07:23 +00:00
hcd-ehci.c Revert "ehci: make idt processing more robust" 2016-04-19 08:20:56 +02:00
hcd-ehci.h
hcd-musb.c Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND 2016-03-22 22:20:17 +01:00
hcd-ohci.c remove useless muldiv64() 2016-06-07 18:02:49 +03:00
hcd-uhci.c usb/uhci: move pid check 2016-04-25 12:05:05 +01:00
hcd-xhci.c nec-usb-xhci: set the device state to USB_STATE_DEFAULT 2016-07-12 10:23:59 +02:00
host-legacy.c usb: Clean up includes 2016-01-29 15:07:23 +00:00
host-libusb.c usb-host: add special case for bus+addr 2016-06-13 13:17:06 +02:00
host-stub.c usb: Clean up includes 2016-01-29 15:07:23 +00:00
host.h
libhw.c usb: Clean up includes 2016-01-29 15:07:23 +00:00
Makefile.objs xen: add pvUSB backend 2016-05-23 13:30:03 +02:00
quirks-ftdi-ids.h
quirks-pl2303-ids.h
quirks.c usb: Clean up includes 2016-01-29 15:07:23 +00:00
quirks.h
redirect.c usb: Use DIV_ROUND_UP 2016-06-07 18:19:25 +03:00
trace-events trace: split out trace events for hw/usb/ directory 2016-06-20 17:22:15 +01:00
tusb6010.c Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND 2016-03-22 22:20:17 +01:00
xen-usb.c os-posix: include sys/mman.h 2016-06-16 18:39:03 +02:00