Date: Thu, 14 Oct 2010 23:10:31 +0200 From: Hans Petter Selasky <hselasky@c2i.net> To: Weongyo Jeong <weongyo@freebsd.org> Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-user@freebsd.org" <svn-src-user@freebsd.org> Subject: Re: svn commit: r213847 - user/weongyo/usb/sys/dev/usb Message-ID: <201010142310.31272.hselasky@c2i.net> In-Reply-To: <20101014203932.GK38869@weongyo> References: <201010142219.08408.hselasky@c2i.net> <20101014203932.GK38869@weongyo>
index | next in thread | previous in thread | raw e-mail
On Thursday 14 October 2010 22:39:32 Weongyo Jeong wrote:
> On Thu, Oct 14, 2010 at 10:19:08PM +0200, Hans Petter Selasky wrote:
> > On Thursday 14 October 2010 22:04:05 Weongyo Jeong wrote:
> > > + for (i = 0; i < up->up_frames; i++) {
> > > + if (ptr + sizeof(u_int32_t) >= end)
> > > + goto done;
> > > + *((u_int32_t *)ptr) = xfer->frlengths[i];
> > > + ptr += sizeof(u_int32_t);
> > > +
> > > + if (ptr + xfer->frlengths[i] >= end)
> > > + goto done;
> > > + usbd_get_page(&xfer->frbuffers[i], 0, &res);
> > > + bcopy(res.buffer, ptr, xfer->frlengths[i]);
> > > + ptr += xfer->frlengths[i];
> > > + }
> >
> > For isochronous transfers only the first frbuffer is used for all
> > transfers, which are back to back.
>
> Do you mean that we should dump only xfer->frbuffers[0] even if
> xfer->nframes > 1 for isochronous xfer?
You should sum the frame lengths from 0 and upwards and use that for offset
from xfer->frbuffers[0]. When the transfer is complete you need to know the
old framelength, which I think there is already a variable for.
--HPS
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010142310.31272.hselasky>
