Blame 0101-usb-hub-dont_trigger_assert_on_packet_completion.patch

Justin M. Forbes 6f9d9c
diff --git a/hw/usb-hub.c b/hw/usb-hub.c
Justin M. Forbes 6f9d9c
index b49a2fe..6278825 100644
Justin M. Forbes 6f9d9c
--- a/hw/usb-hub.c
Justin M. Forbes 6f9d9c
+++ b/hw/usb-hub.c
Justin M. Forbes 6f9d9c
@@ -207,10 +207,14 @@ static void usb_hub_complete(USBPort *port, USBPacket *packet)
Justin M. Forbes 6f9d9c
     /*
Justin M. Forbes 6f9d9c
      * Just pass it along upstream for now.
Justin M. Forbes 6f9d9c
      *
Justin M. Forbes 6f9d9c
-     * If we ever inplement usb 2.0 split transactions this will
Justin M. Forbes 6f9d9c
+     * If we ever implement usb 2.0 split transactions this will
Justin M. Forbes 6f9d9c
      * become a little more complicated ...
Justin M. Forbes 6f9d9c
+     *
Justin M. Forbes 6f9d9c
+     * Can't use usb_packet_complete() here because packet->owner is
Justin M. Forbes 6f9d9c
+     * cleared already, go call the ->complete() callback directly
Justin M. Forbes 6f9d9c
+     * instead.
Justin M. Forbes 6f9d9c
      */
Justin M. Forbes 6f9d9c
-    usb_packet_complete(&s->dev, packet);
Justin M. Forbes 6f9d9c
+    s->dev.port->ops->complete(s->dev.port, packet);
Justin M. Forbes 6f9d9c
 }
Justin M. Forbes 6f9d9c
 
Justin M. Forbes 6f9d9c
 static void usb_hub_handle_attach(USBDevice *dev)