Hi,
On Thu, Jan 24, 2013 at 06:23:08PM +0800, victor yeo wrote:
> Hi,
>
> >> >> > Also, you shouldn't requeue the request yourself, gadget driver owns
> >> >> > the
> >> >> > request.
> >> >> which request do i requeue? please kindly point that out. Thanks!
> >> >
> >> > look at your code. Look what you do after you call complete.
> >>
> >> is it this code? i will remove the redundant code after complete.
> >>
> >> ka_ep_p->req.complete(&ka_ep_p->ep, &req->req);
> >> if (num == 0) {
> >> ka_ep_p->req.length = 0;
> >> usb_ep_queue(&ka_ep_p->ep, &req->req, 0);
> >> ka_ep_p->desc = &ep0_in_desc;
> >> }
> >
> > you should delete the request from your list. Whatever you do, has to be
> > undone.
>
> got it. i add list_del_init() to delete the request from the list._init() is unnecessary > > >> i read the net2272.c, the net2272_enable() is called by gadget driver > >> enable_endpoint(). When i run the gadget driver, enable_endpoint() is > >> called for fsg->bulk_in and fsg->bulk_out. The enable_endpoint() of > >> fsg->intr_in is not called because transport_is_cbi() is false. So > >> how can the endpoint 0 be enabled? > > > > endpoint 0 has to be always enabled by the UDC driver. Gadget driver > > expects endpoint 0 to be ready. > > i read through the net2272.c, i do not see where the endpoint 0 is > enabled. I blindly enable my endpoint zero. i think my code is wrong. > kagen2_ep_enable(&ka_ep->ep, &ep0_in_desc); > kagen2_ep_enable(&ka_ep->ep, &ep0_out_desc); yeah, you need to enabled it during driver initialization -- balbi
signature.asc
Description: Digital signature
