From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWNrf-00008w-PD for qemu-devel@nongnu.org; Tue, 14 Jun 2011 03:16:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWNre-0000LH-TA for qemu-devel@nongnu.org; Tue, 14 Jun 2011 03:16:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWNre-0000Kc-MG for qemu-devel@nongnu.org; Tue, 14 Jun 2011 03:16:42 -0400 Message-ID: <4DF70AD4.1030409@redhat.com> Date: Tue, 14 Jun 2011 09:16:36 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] usb-musb: calls usb_packet_complete() on packets with no owner List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers 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