Hi, On Mon, Jan 21, 2013 at 01:32:09PM +0800, victor yeo wrote: > >> > This log looks oddly incomplete. A lot of debugging messages are > >> > missing. > >> > > >> >> g_file_storage gadget: ep0-setup, length 8: > >> >> 00000000: 80 06 00 01 00 00 40 00 > >> >> g_file_storage gadget: get device descriptor > >> > > >> > For example, right here we should see the device descriptor data that > >> > was sent back to the host. > >> > >> I checked the log again, the dmesg log did not contain that info. May > >> i know which part of the gadget code will print out the device > >> descriptor data that was sent back to the host? > > > > ep0_complete(), where it calls dump_msg(). > > My Usb gadget hardware was broken for 2 weeks, i am sorry for the late > reply. Today i check the ep0_complete() function, it is not called > during Usb mass storage gadget enumeration with host PC. I am not sure > which part of file_storage.c called ep0_complete(). Please kindly > point out to me. Thanks. ep0_complete() should be called by your UDC driver. Seriously dude, read the documentation and read other drivers to figure out how things should be called. A quick look in the storage drivers would have shown you that ep0_complete() is passed in as req->complete() through the usb_request structure. That structure (well, a pointer to it) is passed to the UDC driver through usb_ep_queue(). All you had to figure out is "when it req->complete called". ANY UDC driver would have given you the answer. Likely your UDC driver is still buggy, if you don't call ->complete(), you're starving your usb_request queue. -- balbi
Attachment:
signature.asc
Description: Digital signature