On Fri, 20 Jan 2006 [EMAIL PROTECTED] wrote:
> Hi,
>
> I'm currently coding a device driver for a high speed device.
> Unfortunately,
> the test have shown, that the transfer rate is real slow.
>
> The code is as follows:
>
> urb = usb_alloc_urb( 0, GFP_KERNEL );
> .....
> usb_fill_bulk_urb( urb, usb_dev, pipe, data, len,
> wcam_usb_api_blocking_completion, context );
> init_completion( &sbuf->done );
> .....
> urb->actual_length = 0;
> status = usb_submit_urb(urb, GFP_ATOMIC);
> .....
> if ( status == 0 )
> {
>
> wait_for_completion( &sbuf->done );
>
> }
>
> The memory to transfer is 307200 Bytes, the enpoint transfers up to 320
> Byte.
> BTW, is it possible to increase the Bulk transfersize beyond the 512 Bytes
> ?
Your question isn't clear. No, it's not possible for bulk endpoints to
transfer more than 512 bytes per packet. Yes, it is possible for
urb->transfer_length to be larger than 512 (the host controller driver
will divide the data up into packets).
> Now, what I get is, that the completion handler is called 960 times in 120
> ms, which means
> that the driver uses a single microframe to transfer 320 Bytes.
I don't understand. The code above calls usb_submit_urb only once, so the
completion handler should be called only once. Not 960 times.
> So my question is: How do I have to configure the bulk transfer to get the
> maximum speed ?
In your code above, store all 307200 bytes in data and set len to 307200.
Alan Stern
-------------------------------------------------------
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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users