Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6394234pxb; Tue, 15 Feb 2022 01:13:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwdLRSihQRC+f94kklZ8+xL3qP/qOMkxbwKEwKnghO7PQAaWAz3gqTq7Q6huFHlIAfV4z94 X-Received: by 2002:a63:2b8a:: with SMTP id r132mr2700658pgr.47.1644916421311; Tue, 15 Feb 2022 01:13:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644916421; cv=none; d=google.com; s=arc-20160816; b=oEj17TofZRTm5NN/cpljjz1lDCPcisuTGTQVXo56MDvOJCxcPGUB+tNhlyZUvRnEIJ nluHnkJvfn3BZwuJZG73r3QSCbBNk+420VW3LiOnvRR4FtW0ycPMp+mI3C2avZQyi12H 6cAlfi/VGcthy0bmliXfs6soRZRz7+y2/IZdPQEj4mPbiim+i/npZK5uaqveNPU92d96 2Rn7ggVv57uuWGgWUZK3oLGcGp2Som57iRsVe8XKzZootcC3UE/GoFN+YphQtc8kYvgq HkdnxgO8eJZ4RrcXsUQoCdbK+4qwtFViI5krxUb3HxiJWU9S615255XQC5LgCxRnqfCP z+mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:user-agent :in-reply-to:mime-version:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=SRsg8T/OPnQjmJqo/heZLDC52o8CsKO+t4bo75zyF8s=; b=cP4aEUV/KFYBxfm9uCFQ302DpNADiWSiVYYrhGI5UVmRDrgb/nrqLFXcT6BIqBMsEl 7KMNboI7Ysa3oFMXfaGaJ3A/2U5zd18adBBVc/pGkSScQRHwUz9s6kwXhdoTc2uWMFyJ fQhtsJ7iGnNn10gXol0ndpxFgj7WWY5HTrnPcyXgRf7K7yBFzCR1267VBqYpwIN04O0t 0E3+4iVval2SYVzkq3/wFzCZuqwySGC9FyoRXJGspRU5vjaSndxk8h6Ppy9Mb7Pq3YzJ uHIn4ySgaSeROP0u7REnvIGJVklmawLrtSV5nY3SyQgteGfQL0UTjCe6d6Xg71yFYDd+ zoRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="gM/4USTg"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v19si14024728pjn.4.2022.02.15.01.13.26; Tue, 15 Feb 2022 01:13:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="gM/4USTg"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234656AbiBOHBD (ORCPT + 99 others); Tue, 15 Feb 2022 02:01:03 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230351AbiBOHBB (ORCPT ); Tue, 15 Feb 2022 02:01:01 -0500 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 444743EAAE for ; Mon, 14 Feb 2022 23:00:50 -0800 (PST) Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20220215070048epoutp0144fd164efbe97553800c3cc0a0d34f0b~T44TT50aN0973809738epoutp01U for ; Tue, 15 Feb 2022 07:00:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20220215070048epoutp0144fd164efbe97553800c3cc0a0d34f0b~T44TT50aN0973809738epoutp01U DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1644908448; bh=SRsg8T/OPnQjmJqo/heZLDC52o8CsKO+t4bo75zyF8s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gM/4USTgPJRS1gPeNrCloswHupOnAk+sqBfSGXGKxgHatDPZ1qvivq+HKnrCdCm7l KcXq9ZVectcYc5RgG+ay7+XVJsluwAtcrKEJIr6NXu8QlJKpa0007uquGwIAv0nCaW 30xww0qxOV8S6lYMoGVWpew2QmyHPyK6eG417jkE= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20220215070047epcas2p4d07eca8aeb686d84644d297c0655cc4e~T44Sb0XDl2412424124epcas2p4X; Tue, 15 Feb 2022 07:00:47 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.36.99]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4JyX6g5Tcbz4x9Pp; Tue, 15 Feb 2022 07:00:43 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 37.49.12141.18F4B026; Tue, 15 Feb 2022 16:00:17 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p1.samsung.com (KnoxPortal) with ESMTPA id 20220215070040epcas2p1fcd565aafa659ef677b45d414fe65792~T44MP0Ncm3059430594epcas2p1S; Tue, 15 Feb 2022 07:00:40 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220215070040epsmtrp1021b9f20207f005f621f131c4808002a~T44MPElEK0510805108epsmtrp1T; Tue, 15 Feb 2022 07:00:40 +0000 (GMT) X-AuditID: b6c32a48-d5dff70000002f6d-50-620b4f81f95b Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 45.85.08738.89F4B026; Tue, 15 Feb 2022 16:00:40 +0900 (KST) Received: from ubuntu (unknown [12.36.155.120]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220215070040epsmtip12d42ee1053040720cc37ab306ebd86e6~T44MC656X2677026770epsmtip1j; Tue, 15 Feb 2022 07:00:40 +0000 (GMT) Date: Tue, 15 Feb 2022 15:58:26 +0900 From: Jung Daehwan To: Greg Kroah-Hartman Cc: Felipe Balbi , linux-usb@vger.kernel.org, open list , quic_wcheng@quicinc.com, quic_jackp@quicinc.com, Thinh.Nguyen@synopsys.com Subject: Re: [PATCH v2 1/2] usb: dwc3: Not set DWC3_EP_END_TRANSFER_PENDING in ep cmd fails Message-ID: <20220215065826.GD144890@ubuntu> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOJsWRmVeSWpSXmKPExsWy7bCmuW6jP3eSwcprlhbH2p6wWzQvXs9m cXnXHDaLRctamS12/VvEZLFpdx+rxaoFB9gd2D02repk89g/dw27x8Q9dR5b9n9m9Pi8SS6A NSrbJiM1MSW1SCE1Lzk/JTMv3VbJOzjeOd7UzMBQ19DSwlxJIS8xN9VWycUnQNctMwfoCiWF ssScUqBQQGJxsZK+nU1RfmlJqkJGfnGJrVJqQUpOgXmBXnFibnFpXrpeXmqJlaGBgZEpUGFC dkb/hMssBf8EKz7uncLSwNjM38XIySEhYCJxeetbpi5GLg4hgR2MEuduvWCBcD4xSqz5+IQR wvnMKDFp03M2mJYrU16wQiR2MUocmfuRGcJ5wijxc/MFFpAqFgFViV9TOxhBbDYBLYl7P04w g9giAsYS/WdnsYM0MIMsvLH9G1hCWCBW4sK2N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VPWKU6HvQxgSSYBFQlfg1tYMRxGYT0JK49+MEWLOIgLFE /9lZ7CANzCBT1y77ClYkLBArcWFbGxuIzSugI3Hm0wE2iKnfGCW2Pr3PCpEQlDg58wkLiM0M NPXGv5dA2ziAbGmJ5f84QMKcApoS906uZQcJiwqoSLw6WD+BUXAWkuZZSJpnITQvYGRexSiZ WlCcm55bbFhglJdarlecmFtcmpeul5yfu4kRHANaWjsY96z6oHeIkYmD8RCjBAezkghv3FnO JCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8F7pOxgsJpCeWpGanphakFsFkmTg4pRqY9j3atrNR VPLuxNSo8zllfnuO+O5e5yEl95xvzWX7N03z2Ta6uN3M/PGZRexao//Bd86ykuqtWuEBD7g1 Cg6H8E9X8F92sUlKw7RdRH3R++bijLUzeLYr8kb/ODHngvnn1a+uuV0T+3dw6Z9vcfLK+w74 8p68wv8gKF2tWvuyVpXA0v6fZV67IwM4U2v2Kn+Nmyh/65JYUGmfKMfMs+kv3136uOfas2n/ vuuFvFTLdwgTXKLTODGG//OxCde/pmQrs3R6rTrAdqhrwfOd09/qS3zgKZH8qjkjj/XvhqCt ZnXBXFfb9//vd/g+1bx9q8HDEJPjf2bs7mANttR51Tnpe3bVnVWhZ4rbFhivkj/irsRSnJFo qMVcVJwIACjI+qvwAgAA X-CMS-MailID: 20220215070040epcas2p1fcd565aafa659ef677b45d414fe65792 X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----Jd1PkHJvbSWK3nTfpzLY69px07-gfkp_xqPU6voikj1qGUH4=_e8e52_" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220214111149epcas2p1a1faeda037991885fd6f2f026fa44ec5 References: <1644836933-141376-1-git-send-email-dh10.jung@samsung.com> <1644836933-141376-2-git-send-email-dh10.jung@samsung.com> X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ------Jd1PkHJvbSWK3nTfpzLY69px07-gfkp_xqPU6voikj1qGUH4=_e8e52_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline On Mon, Feb 14, 2022 at 12:29:49PM +0100, Greg Kroah-Hartman wrote: > On Mon, Feb 14, 2022 at 08:08:52PM +0900, Daehwan Jung wrote: > > It always sets DWC3_EP_END_TRANSFER_PENDING in dwc3_stop_active_transfer > > even if dwc3_send_gadget_ep_cmd fails. It can cause some problems like > > skipping clear stall commmand or giveback from dequeue. We fix to set it > > only when ep cmd success. Additionally, We clear DWC3_EP_TRANSFER_STARTED > > for next trb to start transfer not update transfer. > > So is this two different changes? > > > > > Signed-off-by: Daehwan Jung > > What commit id does this fix? > > thanks, > > greg k-h > Hi greg, Below is commit id to fix. commit c58d8bfc77a2c7f6ff6339b58c9fca7ae6f57e70 Author: Thinh Nguyen Date: Wed Dec 18 18:14:44 2019 -0800 usb: dwc3: gadget: Check END_TRANSFER completion While the END_TRANSFER command is sent but not completed, any request dequeue during this time will cause the driver to issue the END_TRANSFER command. The driver needs to submit the command only once to stop the controller from processing further. The controller may take more time to process the same command multiple times unnecessarily. Let's add a flag DWC3_EP_END_TRANSFER_PENDING to check for this condition. Fixes: 3aec99154db3 ("usb: dwc3: gadget: remove DWC3_EP_END_TRANSFER_PENDING") Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman Wesley may have run into same issue and I think it's better for us to discuss. https://protect2.fireeye.com/v1/url?k=9d423b69-fc3fd32e-9d43b026-74fe485fff30-77a099b52659410d&q=1&e=20b4d9f5-2599-4f57-8b6a-7c4ec167d228&u=https%3A%2F%2Flore.kernel.org%2Flinux-usb%2F20220203080017.27339-1-quic_wcheng%40quicinc.com%2F Best Regards, Jung Daehwan ------Jd1PkHJvbSWK3nTfpzLY69px07-gfkp_xqPU6voikj1qGUH4=_e8e52_ Content-Type: text/plain; charset="utf-8" ------Jd1PkHJvbSWK3nTfpzLY69px07-gfkp_xqPU6voikj1qGUH4=_e8e52_--