aboutsummaryrefslogtreecommitdiff
path: root/hw/usb-hub.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-12-16 17:03:44 +0100
committerGerd Hoffmann <kraxel@redhat.com>2011-05-04 14:11:08 +0200
commit13a9a0d3e253e272744b523e39642c9b6d564f4d (patch)
treef8591c4f360bd40a98fc756195920181cac71ec4 /hw/usb-hub.c
parent5dc1672b279344b5e4e1ba5526a8e45466b953a8 (diff)
usb: move complete callback to port ops
Diffstat (limited to 'hw/usb-hub.c')
-rw-r--r--hw/usb-hub.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/usb-hub.c b/hw/usb-hub.c
index 3dd31ba31f..e0588f891d 100644
--- a/hw/usb-hub.c
+++ b/hw/usb-hub.c
@@ -256,6 +256,19 @@ static void usb_hub_wakeup(USBDevice *dev)
}
}
+static void usb_hub_complete(USBDevice *dev, USBPacket *packet)
+{
+ USBHubState *s = dev->port->opaque;
+
+ /*
+ * Just pass it along upstream for now.
+ *
+ * If we ever inplement usb 2.0 split transactions this will
+ * become a little more complicated ...
+ */
+ usb_packet_complete(&s->dev, packet);
+}
+
static void usb_hub_handle_attach(USBDevice *dev)
{
USBHubState *s = DO_UPCAST(USBHubState, dev, dev);
@@ -524,6 +537,7 @@ static USBPortOps usb_hub_port_ops = {
.attach = usb_hub_attach,
.detach = usb_hub_detach,
.wakeup = usb_hub_wakeup,
+ .complete = usb_hub_complete,
};
static int usb_hub_initfn(USBDevice *dev)