On Tue, 13 Jul 2010 16:33:02 +0200, Shivdas Gujare <shivdas.tech@xxxxxxxxx> wrote:
Hi, Is there any factor which decides "how may requests should be allocated for certain endpoint?" for. ex, most of gadget driver's have a kind of for loop like for (i=0; i < number_of_requests; i ++) { usb_ep_alloc_request(ep, GFP_ATOMIC); } so, which factor decides what should be the value of "number_of_requests" in above for loop, if we want to write a new gadget driver? Thanks for the help.
More buffers allow for double-or-more buffering. If you are writing a new driver just stick to one request. If things starts working try to add more requests for better buffering. How many exactly, I'm probably not the best person to answer but I'd say as many as it'll take to keep the hardware busy all the time. This is pretty protocol and gadget dependent. -- Best regards, _ _ | Humble Liege of Serenely Enlightened Majesty of o' \,=./ `o | Computer Science, Michał "mina86" Nazarewicz (o o) +----[mina86*mina86.com]---[mina86*jabber.org]----ooO--(_)--Ooo-- -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html