On Wednesday 04 July 2007, Oliver Neukum wrote:
> Hi,
> 
> as you proposed that the APIs of host and gadget be made more similar,

... in part, since it was designed to eliminate the need for
most memory allocations in the submit path ...


> I've got questions on the gadget API.
> 
>       struct usb_request *(*alloc_request) (struct usb_ep *ep,
>               gfp_t gfp_flags);
>       void (*free_request) (struct usb_ep *ep, struct usb_request *req);
> 
> Why is ep passed to free_request() ? Indeed it is not stored in
> struct usb_request. Is there some subtle reason?

API symmetry should be sufficient.  :)


> alloc_request() is not given the length. Is that because buffers don't
> matter for preallocation on the gadget side?

Buffer management is separate.  Some drivers package things
that allocate both request and buffer at the same time, but
others take buffers from other layers and thus can't couple
the two.

- Dave


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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