From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753747Ab0IMQ1m (ORCPT ); Mon, 13 Sep 2010 12:27:42 -0400 Received: from mail-ew0-f46.google.com ([209.85.215.46]:42886 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751630Ab0IMQ1k (ORCPT ); Mon, 13 Sep 2010 12:27:40 -0400 Message-ID: <4C8E50CC.3080705@ru.mvista.com> Date: Mon, 13 Sep 2010 20:26:52 +0400 From: Sergei Shtylyov User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Sergei Shtylyov CC: Ming Lei , greg@kroah.com, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, David Brownell , Felipe Balbi , Anand Gadiyar , Mike Frysinger Subject: Re: [RESEND/PATCH 5/6] USB: musb-gadget: complete request only if data is transfered over References: <1283873014-32511-1-git-send-email-tom.leiming@gmail.com> <1283873014-32511-6-git-send-email-tom.leiming@gmail.com> <4C8E18AD.8000502@ru.mvista.com> <4C8E4882.6040600@ru.mvista.com> In-Reply-To: <4C8E4882.6040600@ru.mvista.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. I wrote: >>> But why not modify the conditional above all that code, just excluding >>> 'is_dma' from it. This conditional already includes (request->actual == >>> request->length) check. Please recast this patch. >> The two condition is OR relation, not and, so we can't exclude >> 'is_dma' simply. > Yes, we can. You're clearly handling only the DMA case with your > added check, the PIO case was already handled. >> Anyway, the change is not wrong, right? > Not wrong, but the check is duplicate. Oops, I've been too fast and haven't realized that the check done here _is_ actually wrong. It causes ZLP send to trigger too fast in the DMA case. So please fix this patch. Felipe, please drop it for now. WBR, Sergei