USB stack driver options for the receive side question
Hans Petter Selasky
hps at selasky.org
Tue Oct 28 06:38:45 UTC 2014
On 10/28/14 04:03, Nidal Khalil wrote:
> Hello All,
> I am setting up usb to transfer 3 frames on the bulk read descriptor but
> all I get is one frame transferred? Basically aframe = 1
>
> However if I use .short_frames_ok = 1, then the transfer will pend till the
> three frames are received. This code is part of a network driver
> I would like to receive the one buffer it is the only one available and at
> most three buffers at a time if the transfer is complete.
> The one frame a time to respond to ping and three frame at time when the
> transfer load is heavy.
>
> Is this a limitation of FreeBSD.
> I searched all the drivers in the 9.3 release and I can not find a driver
> that is setup to receive multiple buffers?
>
> Below is my sample code:
>
Hi,
The USB hardware drivers don't have a timeout on the multi-transfers.
The only mechanism that is widely accepted is the so-called short packet
termination mechanism, and that is enabled when "short_frames_ok = 0"
and "short_xfer_ok = 1".
If the hardware can tell in advance the lengths of the IP-packets, then
you can setup a multi-job to receive them, or if the hardware can be
configured to pad with zero-length packets up to a configurable number,
it will work too.
--HPS
More information about the freebsd-usb
mailing list