On Mon, Jan 21, 2013 at 11:14:19PM +0800, victor yeo wrote: > Hi, > > >> >> >> Yes, ep0_complete() is called in UDC driver queue function, i just > >> >> >> added it in and ep0_complete() is called now. The dmesg output is > >> >> >> below. > >> >> > > >> >> > not in queue function, you should call it when completing. > >> >> > > >> >> > >> >> Is there any mistake in my understanding of ep0 setup data processing? > >> >> > >> >> 1. usb gadget HW IRQ is triggered if ep0 receives data > >> >> 2. fsg_setup() is called > >> >> 3. ep0_queue() is called > >> >> 4. UDC driver queue function is called > >> >> 5. UDC driver sends data to ep0 HW buffer > >> >> 6. UDC driver increments req->actual by the amount of transferred bytes > >> >> 7. UDC driver call ep0_complete() > >> > > >> > looks correct > >> > > >> > >> Some progress, now i am able to see the dump_msg from ep0_complete(). > >> It looks like the enumeration is ok, but the SCSI Inquiry command is > >> not received by the UDC driver. The do_scsi_command() in > >> fsg_main_thread() is not called. Is this another bug in my UDC driver? > > > > I would believe so since so many other controllers work just fine. > > Is there any way to to further debug into why do_scsi_command() is not called? usbmon, printk(), trace_printk(), kernel function tracer, there are many ways choose one and spend some time debugging, I'm sure you'll find the bug. -- balbi
Attachment:
signature.asc
Description: Digital signature