Hello,
I maintain a 2.4 USB driver based off an old version of usb-skeleton.c.
(It's for an in-house tester used where I work, and the choice of kernel
version is out of my hands.) I've just taken a look at the latest (2.6)
version of usb-skeleton.c, and I'm wondering if someone would be
generous enough to explain to me how a part of it works.
It's the writes I'm wondering about. It appears that the code allocates
a new URB and buffer for each write. Once the write is completed, the
associated URB and buffer are freed. But one of the ways I benchmark
our download speeds is by filling a 4K buffer with valid packets and
looping over a single write(2) call. With the CPU being so much faster
than USB and an URB/buffer pair being allocated for each write, it would
seem like it wouldn't be long before an -ENOMEM was returned.
Of course, one answer would be, "Don't do that!" But with a sizable
number of testers connected to the same host, I could see the result
being the same, or similar, even during normal usage.
What am I missing?
Thanks,
Sam
-------------------------------------------------------
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://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel