Alan Stern wrote:
On Sun, 7 Mar 2004, David Brownell wrote:


Alan Stern wrote:

It would be nice if the library routines were cognizant of the
bus speed required for the endpoint. You could add an enum usb_device_speed argument to usb_ep_autoconfig(). If nothing
else, you could use it to set the bulk maxpacket value correctly.

Not needed ... high speed bulk maxpacket is fixed size.


I'm thinking of a dual-speed device where the gadget driver wants to
allocate endpoints for a full-speed configuration.  The way it is now, the
driver will have to go through and manually change the wMaxPacketSize
values from 512 to 64.

Given two different endpoint descriptors, drivers can just copy bEndpointAddress from full speed to high speed and initializes highspeed wMaxPacketSize to le16(512) to start with.

It's actually more space-efficient to do it that way than to
try to re-using/modifing a single descriptor ... the descriptors
are 9 bytes in-memory, which which isn't many instractions.


Also, why does the code use max(64, ep->maxpacket)? Won't that cause problems for endpoints where the hardware maxpacket limit is < 64?

Only if you're using full-speed devices. That version was only sanity tested at high speed. At full speed, that line quickly morphed into a min(...). :)

- Dave



Alan Stern







-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to