svn commit: r213847 - user/weongyo/usb/sys/dev/usb
Hans Petter Selasky
hselasky at c2i.net
Thu Oct 14 21:09:15 UTC 2010
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
More information about the svn-src-user
mailing list