From patchwork Tue Jun 12 08:27:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minas Harutyunyan X-Patchwork-Id: 10459671 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2976D60348 for ; Tue, 12 Jun 2018 08:28:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19FB5286A0 for ; Tue, 12 Jun 2018 08:28:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0EBD0286A3; Tue, 12 Jun 2018 08:28:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6482B286A0 for ; Tue, 12 Jun 2018 08:28:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933825AbeFLI2H (ORCPT ); Tue, 12 Jun 2018 04:28:07 -0400 Received: from smtprelay6.synopsys.com ([198.182.37.59]:39354 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933685AbeFLI1o (ORCPT ); Tue, 12 Jun 2018 04:27:44 -0400 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id 44CA21E04F7 for ; Tue, 12 Jun 2018 10:27:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1528792063; bh=Jwzi2m3ZWMcCb1xW3epB6CHDh1ENMqIBkJxo2iVJtBI=; h=Date:From:Subject:To:CC:From; b=lTGkGynu7LA0y7Gy/TNfwpuRtc4JhNSWcGB6Apjuw/XCCVI7seDGjV0vuI31kp8h2 QMOW98a6ruNohLirswLROGjOssPc29JqfRGVj3c9iiyd1Te1Pdu9J5OAEMS1PnO/1l fIvGhM8jBP+7IU5oyGMLTgz6a4FAf7jkoEk5AJh83dG1ErfhXXHEWzXv4pXkWlIUbe YVBRnArNateUk0Qs7QNBfLDpj662dbr1otC4zZayNNecSNddeu5qrsKhQZBKwNG4Nj 2rlal92qDBwgEX6zI3gw8pgg6WnXC53v7eS55vrp1rlSery5qj4ZaLH3DGpdQX1CEl +IMIpLTT9GNew== Received: from US01WXQAHTC1.internal.synopsys.com (us01wxqahtc1.internal.synopsys.com [10.12.238.230]) by mailhost.synopsys.com (Postfix) with ESMTP id A2BB93746; Tue, 12 Jun 2018 01:27:42 -0700 (PDT) Received: from US01WEHTC1.internal.synopsys.com (10.12.239.236) by US01WXQAHTC1.internal.synopsys.com (10.12.238.230) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 12 Jun 2018 01:27:42 -0700 Received: from hminas-z420 (10.13.184.19) by us01wehtc1.internal.synopsys.com (10.12.239.236) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 12 Jun 2018 01:27:41 -0700 Received: by hminas-z420 (sSMTP sendmail emulation); Tue, 12 Jun 2018 12:27:36 +0400 Date: Tue, 12 Jun 2018 12:27:36 +0400 Message-ID: <567e1236bdcd81b113fb29e1cc3ae83a52d8d956.1528792007.git.hminas@synopsys.com> From: Minas Harutyunyan Subject: [PATCH] usb: dwc2: gadget: fix packet drop issue for ISOC OUT transfers To: Felipe Balbi , Greg Kroah-Hartman , Minas Harutyunyan , CC: John Youn MIME-Version: 1.0 X-Originating-IP: [10.13.184.19] Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In ISOC OUT transfer, when the OUT token received while EP disabled, we shouldn't complete a usb request. The current flow completed one usb request, this will lead to a packet drop to function driver. Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/gadget.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 7c71d5aba765..7a5e265f48f7 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -2755,8 +2755,6 @@ static void dwc2_gadget_handle_out_token_ep_disabled(struct dwc2_hsotg_ep *ep) if (dir_in || !ep->isochronous) return; - dwc2_hsotg_complete_request(hsotg, ep, get_ep_head(ep), 0); - if (using_desc_dma(hsotg)) { if (ep->target_frame == TARGET_FRAME_INITIAL) { /* Start first ISO Out */