summary refs log tree commit diff stats
path: root/hw/usb-hub.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-01-06 15:23:10 +0100
committerGerd Hoffmann <kraxel@redhat.com>2012-02-10 11:12:04 +0100
commitd28f4e2d86317f7ef7398651e8a1d493e4bf8c88 (patch)
treed4c76eb6f2378e42f51d59976d0ce652d6358011 /hw/usb-hub.c
parentd1f8b53618b3daa93a113ba02520cd1bd34c254b (diff)
downloadfocaccia-qemu-d28f4e2d86317f7ef7398651e8a1d493e4bf8c88.tar.gz
focaccia-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-hub.c')
-rw-r--r--hw/usb-hub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb-hub.c b/hw/usb-hub.c
index 956b020eed..0f3b2dda0e 100644
--- a/hw/usb-hub.c
+++ b/hw/usb-hub.c
@@ -305,7 +305,7 @@ static int usb_hub_handle_control(USBDevice *dev, USBPacket *p,
                 break;
             case PORT_RESET:
                 if (dev && dev->attached) {
-                    usb_send_msg(dev, USB_MSG_RESET);
+                    usb_device_reset(dev);
                     port->wPortChange |= PORT_STAT_C_RESET;
                     /* set enable bit */
                     port->wPortStatus |= PORT_STAT_ENABLE;