Istvan De wrote:

Hi!

Sorry for the delay in replying, I was the one who started
this thread on usb-devel.
It seems that the acm driver sets the maximum transfer size to
the wMaxPacketSize field of the relevant endpoint descriptor,
this is maximum 64 bytes for a bulk high speed endpoint.
From my experiments this does not just restrict bulk packets to
the correct size but also restricts the maximum number of packets
in a frame to one packet. With 1 frame/ms this gives a limitation of
64k/s.
yes, exactly, this is what I've found in the mailing list archives..

Changing the line

acm->writesize = le16_to_cpu(epwrite->wMaxPacketSize);

to

acm->writesize = 64*17; /* 17 - number of bulk packets in a USB high speed frame */

increases performance for writes considerably.

on the device I've developed it boosted performance about two times..
so it is now 128kbyte/sec => 1Mbit, but this is still far away from
the ~10Mbit of USB2.0/Full Speed :(

I was thinking here of a 480Mbit high speed device. 4k is probably a better
size for the write size if you are going for throughput.

This hack is almost certainly not optimal for usb 2.0 (full speed) devices.
what would be optimal? I can test it if You give me some hints..

I have never looked to see what other drivers did or if a similar change helped
reads as a series of changes in the kernel made the ACM driver unusable for
me (and many others) until recently (when I complained enough to get it fixed).
how did you get it usable? and at what speed?

The usability was that the driver crashed in various ways because of
changes in the driver core - nothing to do with performance.

I wrote my own user space driver which has achieved write speeds of 900k/s.
These speeds should also be achievable for the ACM driver with appropriate
read/write sizes.
900kbytes/sec? that sounds awesome.. using libusb or by direct IOCTL calls?
Is Your driver public? I'd be glad to take a look at it, libusb docs are
really
scarce..

Look here:

http://www.murphy.dk/files/ptyusb.tar.gz

This is configured for our device but you just need to change the device id
and and in and out endpoint numbers and point it at the correct usb location (use
systool -b usb -v to find out where your device is).

It runs as a daemon which creates a pty which remains constantly open and re- connects to the device after reboot - using usb with ACM is a very irritating
replacement for a serial port because of the dynamic nature of usb. If you
hold the device open during reboot a new device is created so you have to quickly
exit and then restart the minicom session after the device has come up and
in the process minicom loses the download file name.

With this I get 600Kbytes/s download with xmodem using a better performing
protocol should get the sort of transfer speed I talked of.

/Brian


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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