From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 23 Sep 2013 02:02:34 +0200 Subject: [U-Boot] [PATCH V4 10/17] usb: gadget: mv_udc: optimize bounce In-Reply-To: <523C9ACB.7050000@boundarydevices.com> References: <1379647780-2623-1-git-send-email-troy.kisky@boundarydevices.com> <201309201258.00209.marex@denx.de> <523C9ACB.7050000@boundarydevices.com> Message-ID: <201309230202.34693.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Troy Kisky, > On 9/20/2013 3:58 AM, Marek Vasut wrote: > > Dear Troy Kisky, > > > >> Only perform one copy, either in the bounce > >> routine for IN transfers, or the debounce > >> rtn for OUT transfer. > >> > >> On out transfers, only copy the number > >> of bytes received from the bounce buffer > >> > >> Signed-off-by: Troy Kisky > >> > >> --- > >> v4: no change > > > > Just a question here. Are you sure we never Send AND Reserve the data in > > one turn? Because that would need two copyings. > > ??? s/Reserve/Receive/ > > As far as I'm aware, a single buffer is only ever used to capture or > provide data not both. > But, if 2 transfers were queued, an OUT and then an IN using the same > buffer, if it worked before > this patch, it should work after as well. How come? Before, it was doing flush before and inval after the transfer, right ? btw what does this part of the patch do/mean ? Why is it there? @@ -387,10 +383,9 @@ static void handle_ep_complete(struct mv_ep *ep) num, in ? "in" : "out", item->info, item->page0); len = (item->info >> 16) & 0x7fff; - - mv_debounce(ep); - ep->req.length -= len; + mv_debounce(ep, in); + DBG("ept%d %s complete %x\n", num, in ? "in" : "out", len); ep->req.complete(&ep->ep, &ep->req); Best regards, Marek Vasut