From patchwork Mon Feb 14 11:08:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jung Daehwan X-Patchwork-Id: 542751 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB907C433FE for ; Mon, 14 Feb 2022 11:32:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351431AbiBNLcI (ORCPT ); Mon, 14 Feb 2022 06:32:08 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:59180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351706AbiBNLaN (ORCPT ); Mon, 14 Feb 2022 06:30:13 -0500 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67E3240A17 for ; Mon, 14 Feb 2022 03:11:53 -0800 (PST) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20220214111151epoutp019c7485f3d56a11c60d8d56c6c3adaede~ToqNQAuxf1889318893epoutp01D for ; Mon, 14 Feb 2022 11:11:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20220214111151epoutp019c7485f3d56a11c60d8d56c6c3adaede~ToqNQAuxf1889318893epoutp01D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1644837111; bh=vo5dCj6f0lE9XyHVfR1Uk+w8viUP5iroIa6Ar1pwTks=; h=From:To:Cc:Subject:Date:References:From; b=RBah/8tj4X4iaXWvaypPOgA2Na7+74kWd6EsiYMQTR8YTeGWTPxsyax4f4khCbtQN EHUhijVzg1kAH3WQcJjVSnAN6hUogWZ3OItqEg6+/KR9wtnaDK7JnFyGZsQpNYS/Aw C6I155ZT4h8qbpTe81YjDeL8yecUUOGOj3gOmzzk= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20220214111150epcas2p435d7e3c9bfb219d59ee36c1ae023f1f6~ToqML7M1F2326823268epcas2p4j; Mon, 14 Feb 2022 11:11:50 +0000 (GMT) Received: from epsmges2p2.samsung.com (unknown [182.195.36.97]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4Jy1kr5nLrz4x9QG; Mon, 14 Feb 2022 11:11:48 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 9B.3F.35137.5583A026; Mon, 14 Feb 2022 20:09:09 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20220214111148epcas2p3fac143c7870c53ecadfb6b093fcf626b~ToqKfaxnx0748407484epcas2p3c; Mon, 14 Feb 2022 11:11:48 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220214111148epsmtrp15721726d40d4abf09784118321c4bd7d~ToqKeuNEw1541015410epsmtrp1M; Mon, 14 Feb 2022 11:11:48 +0000 (GMT) X-AuditID: b6c32a46-d8bff70000018941-f4-620a38552c01 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 60.78.08738.4F83A026; Mon, 14 Feb 2022 20:11:48 +0900 (KST) Received: from ubuntu.dsn.sec.samsung.com (unknown [12.36.155.120]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220214111148epsmtip12a5e91e2420e4853ed0a3abb5f486336~ToqKQO9nN2598625986epsmtip1d; Mon, 14 Feb 2022 11:11:48 +0000 (GMT) From: Daehwan Jung To: Felipe Balbi , Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org (open list), Daehwan Jung , quic_wcheng@quicinc.com, quic_jackp@quicinc.com, Thinh.Nguyen@synopsys.com Subject: [PATCH v2 0/2] Fix ep command fail issue in dequeue Date: Mon, 14 Feb 2022 20:08:51 +0900 Message-Id: <1644836933-141376-1-git-send-email-dh10.jung@samsung.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBKsWRmVeSWpSXmKPExsWy7bCmmW6oBVeSQecWJYtjbU/YLe4smMZk 0bx4PZvF5V1z2CwWLWtlttj1bxGTxabdfawWqxYcYHfg8Ni0qpPNY//cNeweE/fUefRtWcXo sWX/Z0aPz5vkAtiism0yUhNTUosUUvOS81My89JtlbyD453jTc0MDHUNLS3MlRTyEnNTbZVc fAJ03TJzgO5RUihLzCkFCgUkFhcr6dvZFOWXlqQqZOQXl9gqpRak5BSYF+gVJ+YWl+al6+Wl llgZGhgYmQIVJmRnvJl7nbGgnbWi/9Mk1gbGCSxdjBwcEgImEuueancxcnEICexglNj4/zUT hPOJUaLr+1MWCOczo8TTlm+MXYycYB1rZ+6ASuxilFjU9ZEVwvnBKLHm7EV2kLlsAloS3xeC NYgIhElMXLYPrIFZYC+jRNO+u6wgCWEBG4mey2eZQGwWAVWJxY9egtm8Am4Sez9PZIXYJidx 81wnM0izhMAudonDxw4zQSRcJPasPssMYQtLvDq+hR3ClpJ42d8GZRdL7PrUygTR3MAo0fjg BFSDscSsZ+2MIJcyC2hKrN+lDwkMZYkjt1hAKpgF+CQ6Dv9lhwjzSnS0CUE0KktMvzwB6jRJ iYOvz0EN9JBYu3M72L9CArES/VMuMk5glJ2FMH8BI+MqRrHUguLc9NRiowIjeCQl5+duYgQn MS23HYxT3n7QO8TIxMF4iFGCg1lJhDfuLGeSEG9KYmVValF+fFFpTmrxIUZTYHhNZJYSTc4H ptG8knhDE0sDEzMzQ3MjUwNzJX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+nO/boeyrma+5RznigY3Rc3ZtV13B6S927Vq4PLvglqK3UHlkgf+CX4mGlj1M0C C74Twe/mu/hWrL9eMe+4SM73mOfWKT45RuWdNp92zLmi465+prXWzuK2dnlcrMiVDTnL/CbW B/c7/1cI5OIKrBNuaZ4hk2r4uPzKapvdnWkVl7XvC3Hs/FGh1H7ryrJ+jsPlMRt9dzpUlewT 9VJiKc5INNRiLipOBAA19PfEmwIAAA== X-CMS-MailID: 20220214111148epcas2p3fac143c7870c53ecadfb6b093fcf626b X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220214111148epcas2p3fac143c7870c53ecadfb6b093fcf626b References: Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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. It could cause hung task if ENDTRANSFER command should not be completed. It seems like HW(Controller) issue but SW can prevent it. Changes in v2: - fix coding rule Daehwan Jung (2): usb: dwc3: Not set DWC3_EP_END_TRANSFER_PENDING in ep cmd fails usb: dwc3: Prevent cleanup cancelled requests at the same time. drivers/usb/dwc3/gadget.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)