Skip to contentSkip to conversation

hw/usb-musb.c: Don't misuse usb_packet_complete()

PATCH In review Peter Maydell 2 participants 3 messages Jun 14, 2011 – Jun 29, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/usb-musb.c: Don't misuse usb_packet_complete()

In musb_packet() handle final processing of non-asynchronous USB packets by directly calling musb_schedule_cb() rather than going through usb_packet_complete(). The latter will trigger an assertion because the packet doesn't belong to a device.

---
The fix here is as suggested by Gerd.

 hw/usb-musb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/usb-musb.c +1 -1
index 6037193..3eed855 100644
@@ -611,7 +611,7 @@ static void musb_packet(MUSBState *s, MUSBEndPoint *ep,
     }
 
     ep->status[dir] = ret;
-    usb_packet_complete(s->port.dev, &ep->packey[dir].p);
+    musb_schedule_cb(s->port.dev, &ep->packey[dir].p);
 }
 
 static void musb_tx_packet_complete(USBPacket *packey, void *opaque)
Signature · 1 line
1.7.1
#1 lore raw

Gerd: ping?

thanks
-- PMM

Quoted 27 lines · Peter Maydell

In musb_packet() handle final processing of non-asynchronous USB packets by directly calling musb_schedule_cb() rather than going through usb_packet_complete(). The latter will trigger an assertion because the packet doesn't belong to a device.

---
The fix here is as suggested by Gerd.

 hw/usb-musb.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
hw/usb-musb.c +1 -2
index 6037193..3eed855 100644
@@ -611,7 +611,7 @@ static void musb_packet(MUSBState *s, MUSBEndPoint *ep,
     }
 
     ep->status[dir] = ret;
-    usb_packet_complete(s->port.dev, &ep->packey[dir].p);
+    musb_schedule_cb(s->port.dev, &ep->packey[dir].p);
  }
 
  static void musb_tx_packet_complete(USBPacket *packey, void *opaque)
--

1.7.1

#2 lore raw
Quoted 1 line · Peter Maydell

Gerd: ping?

Oops, slipped through somehow. Picked into the usb queue now.

cheers,
Gerd