Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752091AbdLVHzA (ORCPT ); Fri, 22 Dec 2017 02:55:00 -0500 Received: from mga01.intel.com ([192.55.52.88]:7034 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750961AbdLVHy6 (ORCPT ); Fri, 22 Dec 2017 02:54:58 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,439,1508828400"; d="scan'208";a="4880791" From: Felipe Balbi To: Lipengcheng Cc: "linux-usb\@vger.kernel.org" , "linux-kernel\@vger.kernel.org" , Lipengcheng Subject: Re: [PATCH] usb: dwc3: gadget:Core consumes a trb software to fill a trb, in ISO In-Reply-To: <637796ED17F7774FB27D6AAE3C6951584B38C043@dggeml508-mbx.china.huawei.com> References: <637796ED17F7774FB27D6AAE3C6951584B38C043@dggeml508-mbx.china.huawei.com> Date: Fri, 22 Dec 2017 09:54:02 +0200 Message-ID: <87zi6bp59h.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1108 Lines: 34 Hi, Lipengcheng writes: > Iso transmission, the current process is that all trb(HWO=1) is handled. > Then core generate DWC3_DEPEVT_XFERNOTREADY event, Software begin refill > trb, this will produce 0 length package, the patch is to achieve the core > consumes a trb, and then the software fill a trb. Normally, there will never > be DWC3_DEPEVT_XFERNOTREADY event and 0-length packet. > > Signed-off-by: l00229106 who is 100229106?? > --- > drivers/usb/dwc3/gadget.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > index 981fd98..1e6c42e 100644 > --- a/drivers/usb/dwc3/gadget.c > +++ b/drivers/usb/dwc3/gadget.c > @@ -2420,7 +2420,7 @@ static void dwc3_endpoint_transfer_complete(struct dwc3 *dwc, > if (!dep->endpoint.desc) > return; > > - if (!usb_endpoint_xfer_isoc(dep->endpoint.desc)) > + if (!usb_endpoint_xfer_isoc(dep->endpoint.desc) || (dep->flags & DWC3_EP_TRANSFER_STARTED)) this is wrong. isoc endpoints should NEVER be prestarted. -- balbi