Date: Wed, 27 May 2009 22:00:04 +0200 From: Hans Petter Selasky <hselasky@c2i.net> To: Sylvestre Gallon <ccna.syl@gmail.com> Cc: Perforce Change Reviews <perforce@freebsd.org> Subject: Re: PERFORCE change 162889 for review Message-ID: <200905272200.04784.hselasky@c2i.net> In-Reply-To: <164b4c9c0905271239w21e72ad2r14014dfdd11099c9@mail.gmail.com> References: <200905271656.n4RGuEgK056279@repoman.freebsd.org> <200905272129.39606.hselasky@c2i.net> <164b4c9c0905271239w21e72ad2r14014dfdd11099c9@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 27 May 2009, Sylvestre Gallon wrote:
> On Wed, May 27, 2009 at 7:29 PM, Hans Petter Selasky <hselasky@c2i.net>
wrote:
> > On Wednesday 27 May 2009, Sylvestre Gallon wrote:
> >> + case LIBUSB_TRANSFER_TYPE_ISOCHRONOUS:
> >> + /* what means frindex ? */
> >> + libusb20_tr_setup_isoc(usb20_xfer, xfer->buffer,
> >> xfer->length, 0);
> >
> > Unlike in the kernel you need to specify the buffer+length pair for all
> > ISOCHRONOUS frames up to and including "max_frames-1".
> >
> > In you code you have only setup one frame [index 0] .
>
> ok,
>
> if I understand fr_index arguments in libusb20_tr_setup_isoc refers to
> the number of isochronous packets ?
It is the index of the isochronous packet. You setup a transfer of multiple
isochronous packets at a time, and typically initialise like this:
for (i = 0; i != MAX_FRAMES; i++) {
libusb20_tr_setup_isoc(usb20_xfer, buf, MAX_LEN, i);
buf += MAX_LEN;
}
With regard to libusb 1.0 you need to check that structure array extending the
USB transfer for length and pointer information I think.
!NOTE! The userland libusb allowes a per-packet pointer. In the kernel the
packets must be back to back, and only one buffer pointer is used.
--HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905272200.04784.hselasky>
