Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Feb 2008 22:01:07 +0100
From:      Hans Petter Selasky <hselasky@freebsd.org>
To:        Alfred Perlstein <alfred@freebsd.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 129920 for review
Message-ID:  <200802022201.08030.hselasky@freebsd.org>
In-Reply-To: <20080202121301.GY99258@elvis.mu.org>
References:  <200712020001.lB201XbN000811@repoman.freebsd.org> <200802020818.57037.hselasky@freebsd.org> <20080202121301.GY99258@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 02 February 2008, Alfred Perlstein wrote:
> * Hans Petter Selasky <hselasky@freebsd.org> [080201 23:18] wrote:
> > On Saturday 02 February 2008, Alfred Perlstein wrote:
> > > This change makes very little sense.  If xfer->frbuffers is a bare
> > > pointer, then why add 0 to it?  Just pass xfer->frbuffers or use a
> > > macro that explains what you are doing.
> >
> > I can change those to a plain "xfer->frlengths". It was just a reminder
> > for me, because some places we use "xfer->frlengths + 1" and
> > "xfer->frbuffers + 1".
> >
> > I will write a script that converts all of those.
>
> What does '+ 1' mean?  Is it something special like a channel or something?
>
> If so it should be a macro that's more descriptive.

Hi,

"frlengths" and "frbuffers" simply make up an I/O-vector. Usually all elements 
go the same direction, either IN or OUT relative to the USB Host.

The exception is control transfers. These usually have three parts:

<SETUP - OUT> < DATA IN or OUT > < STATUS direction is opposite of DATA stage>

< [frlengths and frbuffers] + 0> < [frlenghts and frbuffers] + 1> < the STATUS 
does not have any frlenghts or frbuffers entry >

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802022201.08030.hselasky>