]> git.proxmox.com Git - qemu.git/commit - hw/usb.h
usb: Replace device_destroy bus op with a child_detach port op
authorHans de Goede <hdegoede@redhat.com>
Fri, 24 Jun 2011 10:31:11 +0000 (12:31 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 5 Jul 2011 13:09:02 +0000 (15:09 +0200)
commit4706ab6cc0af86d3f38806664420cc3eb8999bd9
tree53ca1a3df6c81e2eb309b431f01825496ea4692a
parentd47e59b8b8adc96a2052f7e004cb12b6ff62edd9
usb: Replace device_destroy bus op with a child_detach port op

Note this fixes 2 things in one go, first of all the device_destroy bus
op should be a device_detach bus op, as pending async packets from the
device should be cancelled on detach not on destroy.

Secondly having this as a bus op won't work with companion controllers, since
then there will be 1 bus driven by the ehci controller and thus 1 set of bus
ops, but the device being detached may be downstream of a handed over port.
Making the detach of a downstream device a port op allows the ehci controller
to forward this to the companion controller port for handed over ports.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/milkymist-softusb.c
hw/usb-bus.c
hw/usb-ehci.c
hw/usb-hub.c
hw/usb-musb.c
hw/usb-ohci.c
hw/usb-uhci.c
hw/usb.h