Re: Linux USB file storage gadget with new UDC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

>> >> 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

In the udc driver, i can't assign a single ep0 descriptor to both
ep0_in_desc and ep0_out_desc. i think i should skip ep0_out_desc. Bear
in mind that i only define 3 endpoints in udc driver: ep0, ep1 bulk
in, ep1 bulk out. Will it cause any problem to gadget driver?

thanks,
victor
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux