]> git.proxmox.com Git - mirror_qemu.git/commit - hw/usb-ehci.c
usb: fix port reset
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 15 Sep 2011 10:10:21 +0000 (12:10 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 13 Oct 2011 10:58:51 +0000 (12:58 +0200)
commite0b8e72dd95f5fe133c8bb952a464814ca06fe8b
tree11c2928dee2be883a0021f776238cbe40e4c376b
parent3393bc105d58e1f4a27d9a8e7062da9cef260cc3
usb: fix port reset

commit 891fb2cd4592b6fe76106a69e0ca40efbf82726a removed the implicit
detach before (re-)attaching in usb_attach().  Some usb host controllers
used that behavior though to do a port reset by a detach+attach
sequence.

This patch establishes old behavior by adding a new usb_reset() function
for port resets and putting it into use, thereby also unifying port
reset behavior of all host controllers.  The patch also adds asserts to
usb_attach() and usb_detach() to make sure the calls are symmetrical.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb-ehci.c
hw/usb-ohci.c
hw/usb-uhci.c
hw/usb.c
hw/usb.h