On Friday 03 February 2006 10:28 am, Jeff Warren wrote:
> 
> 1. In at91_udc.c from maxim.org 2.6.12 patch (which is the kernel I am
> using) 

You might consider upgrading to at least 2.6.15 patches; there have
been a lot of improvements since this time last year.


> in the at91_ep_enable function there is code which limits the max 
> packet buffer to 64... 
> ...
> I understand this as the Atmel datasheet says that ...
> Then I noticed under the ep definitions, 45 and five say they have a max
> packet of 256...
> ...
> Why is this?

Reread section 3.19 of the spec ... the line right after the
one you referenced, specifying 64 bytes for ep1 and ep2.  :)


> 2.  Is it even worth considering changing these from a peripheral backed
> ping-pong buffer style to a non peripheral backed buffer that allows for
> larger transfers, or would it be much slower?

I'm curious what you think the usb_request.buffer indicates, if not
just such a buffer, coupled (via PIO) to the hardware FIFOs ... and
leveraging double buffering where the silicon is configured for it.


> 3.  At the end of the ep definition struct there is this comment...
> /* ep6 and ep7 are also reserved */
> Does anyone know if this means they are available and just not declared
> due to older hardware compatibility, or can they not be used by the
> driver for some other reason?  The AT91RM9200 data sheet shows that they
> could potentially be used.

See section 3.19 again; it says just how the rm9200 chip is
configured.  The "potentially" is for other silicon that uses
the same controller design, either custom or catalog parts.

You'll notice that for example the AT91sam7S256 has the same UDC
but it's configured without ep4 or ep5 ... a uClinux patch for
that chip would #ifdef them out.


> 4. I noticed that the serial driver (serial.c) allocates 64 bytes for
> each urb buffer it queues, whereas the zero driver (zero.c) allocates
> 4096 for each urb. 

Neither one allocates URBs.  Gadget drivers talk in terms of
a "struct usb_request *", which is simpler than an URB. (And
doesn't need 120+ KB of usbcore backing it up!)


> If my system only allows a max packet of 64, thats 
> all one urb can hold right? 

The kerneldoc for usb_request says "Bulk endpoints can
use any size buffers"...


> When I look at the function read_fifo in 
> at91_udc.c, from what I read, it will only fill to the maxpacket size
> even if the buffer size of the urb is larger (I think...). 

You are misreading that code.  The bit at the end, where
it may empty the other pingpong buffer, would clearly break
if there were a one-packet limit.

- Dave



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&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