Date: Tue, 28 Oct 2014 07:38:49 +0100 From: Hans Petter Selasky <hps@selasky.org> To: Nidal Khalil <nedmath@gmail.com>, freebsd-usb@freebsd.org Subject: Re: USB stack driver options for the receive side question Message-ID: <544F39F9.3080205@selasky.org> In-Reply-To: <CADoY-6if1KiLvQWTM89JL0GFOcmOUx7Gqg%2B9VVLEdaVyU-t58A@mail.gmail.com> References: <CADoY-6if1KiLvQWTM89JL0GFOcmOUx7Gqg%2B9VVLEdaVyU-t58A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?544F39F9.3080205>