|
From: | Gerd Hoffmann |
Subject: | Re: [Qemu-devel] usb-musb: calls usb_packet_complete() on packets with no owner |
Date: | Tue, 14 Jun 2011 09:16:36 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110419 Red Hat/3.1.10-1.el6_0 Thunderbird/3.1.10 |
Hi,
usb_packet_complete(s->port.dev,&ep->packey[dir].p); which will call usb_packet_complete() on packets which did not return USB_RET_ASYNC from usb_handle_packet, and so trips this assert.
Any suggestions about what the right way to fix this is? (I'm a bit confused about the comment that usb_packet_complete is to 'notify the controller' -- usb-musb is the controller...)
The usual work flow is that the usb device (usb-msd.c does this for example) kicks the I/O, then returns USB_RET_ASYNC, and when the I/O is completed it calls usb_packet_complete().
In case of the musb controller this will call musb_schedule_cb() which is hooked into musb_port_ops->complete. So simply calling musb_schedule_cb() directly for non-async packets should work I think.
cheers, Gerd
[Prev in Thread] | Current Thread | [Next in Thread] |