On Mon, 27 Mar 2006, Peter.Chen wrote:

> Hi,all
> Now,i have developed dm320 gadget driver.
> 1.I look through some udc's corresponding functions
> at kernel source.And i find there will implement 
> IN/OUT through readfifo(writefifo) or DMA .
> Some days ago,Alan told me "file_storage.c will
> call usb_eq_queue(),which calls your dm320_gadget's
> ep->ops->queue() routine",that means file_storage
> will implement IN/OUT through readfifo(writefifo) or DMA
> Is it right?

No.  This means that file_storage will call your dm320 driver.  In turn, 
your driver will implement IN/OUT through readfifo(writefifo) or DMA.  
Which one to use is entirely your decision.  file_storage.c has nothing to 
do with it.

> If then,How about my rx/tx interrupt?They also will 
> call the same functions.

Which same functions?  Surely they won't call your ep->ops->queue() 
routine.

> So i am puzzled,If there is a IN from storage,which one
> will be invoked?
> dm320_eq_quene or my rx interrupt(which comes from usb core
> interrpt)?

file_storage.c will call dm320_eq_queue.  What happens after that is up to 
you.

> 2.Maybe i am a newbie for usb,i even don't know what kinds
> of things i need to do in my dm320_eq_quene function,
> And what it mainly do?Can u tell me?

It has to make sure that the usb_request is carried out.  Read through the 
source code for some of the other UDC drivers in the kernel source to see 
how they work.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to