Re: Linux USB file storage gadget with new UDC

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

 



Hi,

>> > >> >> 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.
>
> It sounds like the UDC driver now works okay for control transfers but
> not for bulk transfers.
>

Some code in file_storage.c that i cannot understand. In
ep0_complete(), the code snippet:

        if (req->status == 0 && req->context)
                ((fsg_routine_t) (req->context))(fsg);

Does the UDC driver provide the context pointer to file_storage.c?

Another gadget question: get_next_command() is receiving command from
host PC, UDC HW isr routine is also receiving data from host PC. What
is the difference between these two?

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