On Mon, Nov 04, 2013 at 02:06:33PM +0100, Moritz Fischer wrote: > Hi guys, > > This is my first post to this list, so let me quickly introduce myself. > I'm a software engineer for Ettus Research (National Instruments). > > One of our new products [1] is a USB 3.0 (using Cypress FX3) based SDR > that currently ships > with a libusb based open source driver integrated in our open source > UHD userland driver. > > Our device comes with ADC/DACs that need high throughput streaming > from and to the host. > We're using bulk transfers to send data to a Spartan 6 FPGA in the device. > > As the CPU usage is quite high and the throughput using libusb is not > as high as we > expect we're currently looking into developing a kernel driver. > Profiling showed we're spending quite some time in the kernel when > using libusb. Where specifically in the kernel? Busywaiting for data transferrs to complete, or doing something else? Are you keeping the pipeline full to the device? You should be able to hit USB "line speed" from userspace if you just are reading/writing bulk data with enough transferrs in flight. > I've started grepping around the tree for an example to steal from and > stumbled upon the > drivers/usb/usb-skeleton.c file. > > Can I base a high throughput (streaming) USB 3.0 driver off of this or > is this not a good starting point to look at? That's a good place to start, but it really depends on what type of interface you want to expose to userspace, as to what the best driver to base off of would be. As you are a ADC/DAC, you probably want to tie into the comedi subsystem, so take a look at the USB drivers in the drivers/staging/comedi/ subdirectories for an example of what to use. hope this helps, greg k-h -- 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