Hello,

On 9/1/05, Alan Stern <[EMAIL PROTECTED]> wrote:
> On Thu, 1 Sep 2005, Sven Duscha wrote:
> 
> > Hello,
> >
> > I'm using a Cypress FX2LP EZ-USB development board to design software
> > for an USB2 Cy7c68013a-128 FX2LP chip.
> >
> > I got the device to work with the usbcore-driver and am now
> > experimenting with bulk transfers. The easiest approach seemed to use
> > functions provided in libusb-0.1.10a (http://libusb.sourceforge.net/)
> > to do bulk transfers with usb_bulk_read and usb_bulk_write.
> >
> > The problem is that in doing so I only get a maximum transfer rate of
> > ca. 3000k/sec. That is beyond the limitations of USB1.1 and therefore
> > the device seems to work in USB2.0 mode, but still far below the
> > limitations of USB2-High speed specifications.
> >
> > I did tests with different firmwares that were provided with KEIL
> > development tools (bulksrc, bulkloop) and ezconsole and none provides
> > any higher transfer speeds.
> >
> > My only guess is that going through generic usbcore-support could be
> > the bottle neck. But I'm a bit reluctant to delve into development of
> > a device driver for the Cypress FX2LP module.
> >
> > On the other hand there is hardly any information on the linux support
> > for the FX2LP available on the net, even the less from Cypress
> > itself. Most drivers and sample applications are for the
> > FX-USB1.1-version only.
> 
> The bottleneck isn't usbcore, it's libusb.  However you don't need to
> write your own device driver.  It's possible to do what you want using
> ioctl and usbfs.  You could even hack the libusb source code to support
> it, if you want.
> 
> What you need is to make asynchronous submissions -- that is, don't wait
> for an URB to complete before submitting the next one.  You should queue
> enough data to fill the bulk pipe for 20 ms or more; thereafter each time
> one URB completes you submit a new URB.  Remember that usbfs has a limit
> of 16 KB per URB.  High-speed bulk transfers are capable of handling up to
> 52 KB/ms, which means you will need to keep at least 1 MB of data (or 64
> URBs) in flight.

I had the same problem (not enough throughput from an FX2 with libusb).
Eric Blossom pointed me
(http://marc.theaimsgroup.com/?l=linux-usb-devel&m=109899814018128&w=2)
to the usrp lib from the gnu software radio project:
ftp://ftp.gnu.org/gnu/gnuradio/usrp-0.8.tar.gz

I was able to get something like 42 MB/sec bulk transfers from my FX2.
But it was dependent on the host controller, some nec chip based
hardware only got me 32 MB/sec.

There was some discussion whether this could go into libusb or whether
the usbfs interface could be extended to support some
scatter-gather-list based high-throughput zero-copy mechanism. There
seemed to be some issues with proper error handling, memory
boundaries, etc. I think there was no real agreement on how, or even
if this could go into usbfs/libusb. Maybe this has changed, meanwhile?

I'd still be interested in some usrp/fusb like functionality in
libusb. I'm afraid my knowledge of dma / sg / memory-boundary related
topics is insufficient to help extending usbfs, but I'd be happy to
help with implementing and testing some kind of a port of the fusb
stuff to libusb.

Cheers,
  Axel


-------------------------------------------------------
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