Re: Linux USB file storage gadget with new UDC

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

 



Hi,

>> > 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.
>> >
>>
>> 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()

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