From owner-svn-src-user@FreeBSD.ORG Thu Oct 14 21:09:15 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CC841065672; Thu, 14 Oct 2010 21:09:15 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.swip.net [212.247.154.225]) by mx1.freebsd.org (Postfix) with ESMTP id A7D888FC15; Thu, 14 Oct 2010 21:09:14 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=4dE6tNKVm/0afO7MQGRPv7y2YwMo4emTIiDjbh74onY= c=1 sm=1 a=5Dq7Mu5n-7QA:10 a=N659UExz7-8A:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=dEu_AODzM5LTwu2e6o8A:9 a=KoUEy9day6YbimQM170A:7 a=fAxp8GihHkT_wXRD2ZstGAFSQVgA:4 a=pILNOxqGKmIA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 35309956; Thu, 14 Oct 2010 23:09:13 +0200 From: Hans Petter Selasky To: Weongyo Jeong Date: Thu, 14 Oct 2010 23:10:31 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.4.5; amd64; ; ) References: <201010142219.08408.hselasky@c2i.net> <20101014203932.GK38869@weongyo> In-Reply-To: <20101014203932.GK38869@weongyo> X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'(; _IjlA: hGE..Ew, XAQ*o#\/M~SC=S1-f9{EzRfT'|Hhll5Q]ha5Bt-s|oTlKMusi:1e[wJl}kd}GR Z0adGx-x_0zGbZj'e(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Message-Id: <201010142310.31272.hselasky@c2i.net> Cc: "src-committers@freebsd.org" , "svn-src-user@freebsd.org" Subject: Re: svn commit: r213847 - user/weongyo/usb/sys/dev/usb X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Oct 2010 21:09:15 -0000 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