On Thu, 23 Mar 2006, Peter Chen wrote:

> Thx Alan.
> 
> Maybe you misunderstood my meaning.

I did understand.

> In my gadget module(dm320_gadget.ko which your file_storage.ko 
> need to invoke usb_gadget_register_driver)

Yes.

> And In my dm320_gadget module,i need to know DMAADDR and DMACOUNT
> value,which will be assigned to corresponding registers.

Yes.

> But the bh->inreq->dma , bh->inreq->length,req->dma  ,req->length
> are in ur module.

Yes.

> So i need some global variables to get it.

No.

> And using these variables in my dm320_gadget module.
> Which ur opinion of my thinking?
> If i can't use in that way,how can i get there value?

file_storage.c calls usb_ep_queue(), which calls your dm320_gadget's
ep->ops->queue() routine, and it passes bh->inreq as the second argument.  
So your module does have access to bh->inreq->dma and bh->inreq->length.

> And can i declare usb_request to myself?

No.  It is already defined in include/linux/usb_gadget.h.  You cannot 
declare it again.

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
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to