From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751513Ab0IOKK2 (ORCPT ); Wed, 15 Sep 2010 06:10:28 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:33351 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750866Ab0IOKK1 (ORCPT ); Wed, 15 Sep 2010 06:10:27 -0400 Message-ID: <4C909B2E.3000909@ru.mvista.com> Date: Wed, 15 Sep 2010 14:08:46 +0400 From: Sergei Shtylyov User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3 MIME-Version: 1.0 To: balbi@ti.com CC: Sergei Shtylyov , Ming Lei , "greg@kroah.com" , "linux-usb@vger.kernel.org" , "linux-omap@vger.kernel.org" , "linux-kernel@vger.kernel.org" , David Brownell , "Gadiyar, Anand" , Mike Frysinger Subject: Re: [RESEND/PATCH 5/6] USB: musb-gadget: complete request only if data is transfered over References: <4C8E18AD.8000502@ru.mvista.com> <4C8E4882.6040600@ru.mvista.com> <4C8E50CC.3080705@ru.mvista.com> <20100914065604.GD2601@legolas.emea.dhcp.ti.com> <4C8F527E.40408@ru.mvista.com> <20100914105402.GD7554@legolas.emea.dhcp.ti.com> <4C8FB60D.1080906@ru.mvista.com> <20100915065345.GC3393@legolas.emea.dhcp.ti.com> <4C909961.10001@ru.mvista.com> <20100915100553.GJ3393@legolas.emea.dhcp.ti.com> In-Reply-To: <20100915100553.GJ3393@legolas.emea.dhcp.ti.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. On 15-09-2010 14:05, Felipe Balbi wrote: >> I didn't say it was duplicate for DMA, just too late. > how come ? we need to send ZLP before giving back the request. Well, look at the code ionce again. We need to send ZLP *after* request->actual == request->length, but as the check is inserted after the ZLP send, ZLP *may* be sent once the first DMA completes, not the last. WBR, Sergei