diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-01-06 15:23:10 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-02-10 11:12:04 +0100 |
commit | d28f4e2d86317f7ef7398651e8a1d493e4bf8c88 (patch) | |
tree | d4c76eb6f2378e42f51d59976d0ce652d6358011 /hw/usb-ohci.c | |
parent | d1f8b53618b3daa93a113ba02520cd1bd34c254b (diff) |
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-ohci.c')
-rw-r--r-- | hw/usb-ohci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c index 425030f141..70f0f08a43 100644 --- a/hw/usb-ohci.c +++ b/hw/usb-ohci.c @@ -449,7 +449,7 @@ static void ohci_reset(void *opaque) port = &ohci->rhport[i]; port->ctrl = 0; if (port->port.dev && port->port.dev->attached) { - usb_reset(&port->port); + usb_port_reset(&port->port); } } if (ohci->async_td) { @@ -1435,7 +1435,7 @@ static void ohci_port_set_status(OHCIState *ohci, int portnum, uint32_t val) if (ohci_port_set_if_connected(ohci, portnum, val & OHCI_PORT_PRS)) { DPRINTF("usb-ohci: port %d: RESET\n", portnum); - usb_send_msg(port->port.dev, USB_MSG_RESET); + usb_device_reset(port->port.dev); port->ctrl &= ~OHCI_PORT_PRS; /* ??? Should this also set OHCI_PORT_PESC. */ port->ctrl |= OHCI_PORT_PES | OHCI_PORT_PRSC; |