Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4970645imm; Mon, 11 Jun 2018 23:51:46 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLeWJlNv9QueUbhNCjeU4OADYiPu65dHJ63cVdTfbNTcZAEGuqD9/LS1z4ihKopWA6vzm+v X-Received: by 2002:a62:642:: with SMTP id 63-v6mr2530239pfg.222.1528786306327; Mon, 11 Jun 2018 23:51:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528786306; cv=none; d=google.com; s=arc-20160816; b=PkkohpY+n7Dm8H/YFrMGC/GksTPmGHRZZQuyGJI3kIte+VMLnQMe/kvoSCOLyrHpJN FAepSycc4pILY4pGXjwJJmKPmugKIs1W8o5u7TS0Kdxm8TP7rd3E/tXHKmdoO8hdUEOE YpcGM5C+Eu/cWwNQwNavBX9U6F2SFAxy8GEDm3aspF73R5np269zooOZB/Uyw5AADjhT GweE+LLBFr+LIj0u6zeOx8KMu97NaZ26/EKGZBBAz1FjFyotzhaaHaEKWoxxdAdHluRW VYD3B7kbBXsHiXxTX2MW0zPn/DqF7JExIPpufI1oX6YFrXAC5zpuP2Q3bMZx47lfhIH5 BgjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=R0j1FAKqW9NZJNNEw6EDBnVnZisNo3Y4K0Iydf9mTUU=; b=J1Bs4pKa/6Q4lYlta6bSm8AdKH+nfoQDDyV+gZRvTtIig3efcpoINLPtQ0glLWlDYW IL+7KDeIc3d5ZrGv03OEepeSv1ONLgnvCzDf1/yXHwpBgpkPuszrBlqMoI4p2O6HOxww i0M7Hmvy+Dpjjh/c33KYaf8JG3DuJrhkBStc/DurXlgp8PCP030meKLmcyRRICT277UE yLa8pPVpvHcqO1NFqRqmwN5xwJCZ/bsDhLnYQG2iNgssKzE0ZklmzZO8bCf34DYYDaAl OduTMqBvuVjo2cKCa4bqSnGKZ/VIHNt0Yync4yMjA6BirMwic/l1I3g8hq679qMkNc8H ye1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a76-v6si227130pfk.35.2018.06.11.23.51.31; Mon, 11 Jun 2018 23:51:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933032AbeFLGvL (ORCPT + 99 others); Tue, 12 Jun 2018 02:51:11 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:51297 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753677AbeFLGvK (ORCPT ); Tue, 12 Jun 2018 02:51:10 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 994DE60F08653; Tue, 12 Jun 2018 14:51:06 +0800 (CST) Received: from dessert.huawei.com (10.69.192.158) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.382.0; Tue, 12 Jun 2018 14:50:59 +0800 From: Zeng Tao To: CC: , Greg Kroah-Hartman , , Subject: [PATCH] usb: dwc2: gadget: fix packet drop issue in dwc2_gadget_handle_nak Date: Tue, 12 Jun 2018 22:49:06 +0800 Message-ID: <1528814947-27098-1-git-send-email-prime.zeng@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.158] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In ISOC transfer, when the NAK interrupt happens, we shouldn't complete a usb request, the current flow will complete one usb request with no hardware transfer, this will lead to a packet drop on the usb bus. Signed-off-by: Zeng Tao --- drivers/usb/dwc2/gadget.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index f0d9ccf..fbe65f6 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -2817,9 +2817,6 @@ static void dwc2_gadget_handle_nak(struct dwc2_hsotg_ep *hs_ep) tmp = dwc2_hsotg_read_frameno(hsotg); if (using_desc_dma(hsotg)) { - dwc2_hsotg_complete_request(hsotg, hs_ep, - get_ep_head(hs_ep), 0); - hs_ep->target_frame = tmp; dwc2_gadget_incr_frame_num(hs_ep); dwc2_gadget_start_isoc_ddma(hs_ep); -- 2.7.4