]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
musb_hdrc: add heuristic to make ethernet peripherals use RNDIS RX mode
authorDavid Brownell <david-b@pacbell.net>
Thu, 28 Sep 2006 14:45:20 +0000 (17:45 +0300)
committerTony Lindgren <tony@atomide.com>
Thu, 28 Sep 2006 14:45:20 +0000 (17:45 +0300)
commit652bfff7bab42615590d1e99f154838a07104907
tree359fa21db19e6bfc195be284c2acdf8db16e7ae2
parent3ddf82bb92f9bec4b6dd8ace1976dd7c8080114e
musb_hdrc:  add heuristic to make ethernet peripherals use RNDIS RX mode

When you're willing to trust the USB host not to commit certain errors, the
CPPI "rndis" RX mode can be used with the peripheral side g_ether driver.
(In other cases, rndis rx mode tends to misbehave _very_ rudely ...)

This patch adds a heuristic to detect when the safe scenario is likely, and
a module parameter to disable the heuristic in contexts when it's likely
to fail; for example, users of gadgetfs will likely need to disable it.

This gave about a 60% improvement in throughput with CDC Ethernet (!!) and a
slight reduction in CPU load.  That's measured with TTCP, which pushes a lot
of full size Ethernet frames and thus can see three IRQs per packet reduced
to just one, and also get I/O overlap when double buffering packets.  That is,
net 10 MByte/sec sustained, using double buffering but no DMA transfer queues;
it's unclear why TX is still just 6 MByte/sec.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
drivers/usb/musb/cppi_dma.c