diff options
author | Gerd Hoffmann | 2012-01-06 15:23:10 +0100 |
---|---|---|
committer | Gerd Hoffmann | 2012-02-10 11:12:04 +0100 |
commit | d28f4e2d86317f7ef7398651e8a1d493e4bf8c88 (patch) | |
tree | d4c76eb6f2378e42f51d59976d0ce652d6358011 /hw/usb-xhci.c | |
parent | usb: kill USB_MSG_{ATTACH,DETACH} (diff) | |
download | qemu-d28f4e2d86317f7ef7398651e8a1d493e4bf8c88.tar.gz qemu-d28f4e2d86317f7ef7398651e8a1d493e4bf8c88.tar.xz qemu-d28f4e2d86317f7ef7398651e8a1d493e4bf8c88.zip |
usb: kill USB_MSG_RESET
The USB subsystem pipes internal reset notifications through
usb_handle_packet() with a special magic PID. This indirection
is a pretty pointless excercise as it ends up being handled by
usb_generic_handle_packet anyway.
Replace the USB_MSG_RESET with a usb_device_reset() function
which can be called directly. Also rename the existing usb_reset()
function to usb_port_reset() to avoid confusion.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb-xhci.c')
-rw-r--r-- | hw/usb-xhci.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/usb-xhci.c b/hw/usb-xhci.c index 37e887c431..7028338a28 100644 --- a/hw/usb-xhci.c +++ b/hw/usb-xhci.c @@ -2346,9 +2346,7 @@ static void xhci_port_write(XHCIState *xhci, uint32_t reg, uint32_t val) /* write-1-to-start bits */ if (val & PORTSC_PR) { DPRINTF("xhci: port %d reset\n", port); - if (xhci->ports[port].port.dev) { - usb_send_msg(xhci->ports[port].port.dev, USB_MSG_RESET); - } + usb_device_reset(xhci->ports[port].port.dev); portsc |= PORTSC_PRC | PORTSC_PED; } xhci->ports[port].portsc = portsc; |