From patchwork Fri Sep 7 13:13:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anurag Kumar Vulisha X-Patchwork-Id: 10592197 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 87E815A4 for ; Fri, 7 Sep 2018 13:15:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A5BB2A93A for ; Fri, 7 Sep 2018 13:15:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E7312B1AE; Fri, 7 Sep 2018 13:15:10 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 E613D2A93A for ; Fri, 7 Sep 2018 13:15:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729341AbeIGRzW (ORCPT ); Fri, 7 Sep 2018 13:55:22 -0400 Received: from mail-eopbgr680053.outbound.protection.outlook.com ([40.107.68.53]:55808 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728906AbeIGRzV (ORCPT ); Fri, 7 Sep 2018 13:55:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4VivjJ8eR/tMk5x1HOhKpeEGXvTa9y0P/UaFqCcVCyM=; b=WOd83gQinFE0XwvFakw6ialzefXS4rXYiGy0pMmx9TA84MXfHq5Ooocx0tc5lSJ0nSczO9wzCibvcBvffG+7s7365VqzFS8LiIfDrmsGqncBRLKFlSBK/j7afyOIMhUOEBTSpX4wLttdp+7raCnvb3KGBflNP2xnear3EEu+HZw= Received: from BL0PR02CA0106.namprd02.prod.outlook.com (2603:10b6:208:51::47) by BYAPR02MB4934.namprd02.prod.outlook.com (2603:10b6:a03:47::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.15; Fri, 7 Sep 2018 13:14:23 +0000 Received: from CY1NAM02FT043.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::209) by BL0PR02CA0106.outlook.office365.com (2603:10b6:208:51::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1122.15 via Frontend Transport; Fri, 7 Sep 2018 13:14:22 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by CY1NAM02FT043.mail.protection.outlook.com (10.152.74.182) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1122.15 via Frontend Transport; Fri, 7 Sep 2018 13:14:20 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1fyGaZ-0000KU-Oi; Fri, 07 Sep 2018 06:14:19 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1fyGaU-0005mb-Kk; Fri, 07 Sep 2018 06:14:14 -0700 Received: from xsj-pvapsmtp01 (xsj-smtp1.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w87DE7Mm019328; Fri, 7 Sep 2018 06:14:07 -0700 Received: from [172.23.64.8] (helo=xhdvnc108.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fyGaN-0005lV-3L; Fri, 07 Sep 2018 06:14:07 -0700 Received: by xhdvnc108.xilinx.com (Postfix, from userid 15427) id BA39460508; Fri, 7 Sep 2018 18:44:06 +0530 (IST) From: Anurag Kumar Vulisha To: , CC: , , , , Anurag Kumar Vulisha Subject: [PATCH v3 6/8] usb: dwc3: check for requests in started list for stream capable endpoints Date: Fri, 7 Sep 2018 18:43:47 +0530 Message-ID: <1536326029-16327-7-git-send-email-anurag.kumar.vulisha@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1536326029-16327-1-git-send-email-anurag.kumar.vulisha@xilinx.com> References: <1536326029-16327-1-git-send-email-anurag.kumar.vulisha@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(346002)(39860400002)(136003)(396003)(376002)(2980300002)(438002)(199004)(189003)(51416003)(110136005)(90966002)(54906003)(97736004)(316002)(76176011)(42186006)(16586007)(5660300001)(106002)(53936002)(8676002)(356003)(47776003)(63266004)(478600001)(106466001)(39060400002)(6266002)(36386004)(186003)(446003)(50226002)(8936002)(11346002)(2616005)(476003)(126002)(426003)(81166006)(81156014)(336012)(305945005)(48376002)(50466002)(486006)(6666003)(14444005)(4326008)(107886003)(26005)(103686004)(36756003)(2906002)(52956003)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR02MB4934;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;LANG:en;PTR:ErrorRetry;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;CY1NAM02FT043;1:kQAUhAZ12Z4lgl4uBP/qG8VD1uVVIkSPV30LGBtQQ6PNvIa3In+KOaF3z6Vhh33WZaLjVnn5OZQFvA0Q6T2os4rkWbhp802zb6fSQTcjojC3GMbtb9xKUk5eOKvJZH06 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 62851096-91ce-4032-19be-08d614c3d2b8 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:BYAPR02MB4934; X-Microsoft-Exchange-Diagnostics: 1;BYAPR02MB4934;3:vZTH/CEzdAYYqNEB84cZcfXJkKA3a05o5FWE/mJS9XZUo1U7CcfNyM+5VY1BSOGdw6oy1FBd88j6q+cNzL8Qc37kzXGe5znkw5VMR3CQHfZ84+cnxK8C3RRVxE6gHFuvw3uynu5Sqq6EY891OGqrUV2g9ACcWvoNzmsD/jh//kWI/y0HSCrQCFSUXxstf41of8rRrXCiMlEzQVQqhtvBYp9tVQDQDKvgWxudyq+XWVTIfYyAshYOgZzhOATGGxo1pzEeV7CQ2ACzSS+YbZouvkOPVLYs62lbD7U3BunsKPRslOEOZZuNa5daMdKeXlkoUtw3FdMJBqdguSqYN/myRThWofwq2wf6sTRwjMdA87A=;25:hX1jGTjRNLUiRmP1k69Ac31mf123cY6HoWNacNdVBziaOfWCgebp7dBb7uwgf9H065glx+6a2p0JZDpMcYARmjkKR9LGL1iotLvLhlWwivNUqOXxdgGVdpD7btUsPMeezo2SKssd082K+cfhZcYhLUHs4id1YYg77Bv/dLj879e0v6lWdLX/TN5i4OfGVFQlTIm5LeTHCeU47bt0weSX+IbM9MIwi1VswiXFd2ew2QtCNOi4zm9HFnOm4bgyzSLAQRgD8m58I1vvhbQr+vL4tIicpiRq/JhxmaRxl1Xbl0n7ClIxar2gaZpjiTA4YGgqVQiq3AW1QwbL3IT0j7Vn8A== X-MS-TrafficTypeDiagnostic: BYAPR02MB4934: X-Microsoft-Exchange-Diagnostics: 1;BYAPR02MB4934;31:Y02qbQBnzepyixvjDaNSkNsw5nRNDu3mT1aXjMZJoG+PTLY9SYqAQX4zKVpsug9WWaWoKZeczAxZayUk38cG6BjHLgOJLTle2661BBlJNlnTH2fVQhdCS8tgNToB8K3PNr6JKmo5MirXCNLxR7Rj2yg+53kJBmhCBJ0sPfsDQFZY39lL7VvBKKj9mciaH/kYT8RXODjf/MQT3xtVvA0EzF4zo41bQu1bL7Wj5shO2Ok=;20:qrSSrnN00ySesxGUd9ZJqfMXLzWS+SUn8VvaD1E+vSNvHkEwFX0sCfqgH52duV7Pcd4+9zcnsHvWZCBVD8nkHb8a3vF1Jg9PpXegkOjniM6L1lnRgXU502q1DvXLfLmnYnteh078Uo/cI6zv77ffICvC40ZmXW00yt/YfuHIQggSQnUngb9uw2pT9ubM/WvnlHm0KL0ojPSTdygrUtkugWWleN2DX6EYyt+lHwO2oZKRpNKw4uvpGhoPcGcO9jyjJpUAfGzaz1quLl+v4poTZzjasITKxf/R8KMG+SvYtcDO6YfQzepFahNHEIn1PTa479Z3Ay9reUfbfl4woUh15jeK5cqVYBkuCxOknHC7yFTaUZWEMKJTi0W12CJdbY2SQyWwRqo15D/eGOE/OotvbVtF4v2tmShIsQHhH/N1Ca3CcHEfluDPblcE/tRJpsKx50zFFNY35wLz1jjZmYJD9wnghzQ2unZAt7mW42g/LponPKrPxJj4EO2fjichYvwm X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231311)(944501410)(52105095)(93006095)(93004095)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699050);SRVR:BYAPR02MB4934;BCL:0;PCL:0;RULEID:;SRVR:BYAPR02MB4934; X-Microsoft-Exchange-Diagnostics: 1;BYAPR02MB4934;4:qs84AsEzwyAwsbfJtr9MU6exZfRITwgf05+DnL+HS4T9bWDMx53AIU+efVSRtDnvHSuMhu6MU9ieMNUnn/VCZw47DqUwgFSpsJVy+6miiFKVPnCdEhuZX+lBbPZ40F8FcU9tBbsBXvzbrUiMT3m5HE6c1/l3AQhPrJ3BGTxNv91RCtkK4ck5XnXuYVLey6Rn5XxrXQv3OZw80B0S0GFUCyu1+eWpGg+ijqN3BeveohiQhTltOLHWJoyCkIVAzM8gqXupR00D3uhNAJuUS+5Vh/cpG3QC3FaZk1lUxvSJL0ZDMsg6E53AErYH73mTz7PP X-Forefront-PRVS: 07880C4932 X-Microsoft-Exchange-Diagnostics: 1;BYAPR02MB4934;23:8Awvga6eZOeRLUawFHYHwRy0MK37Kgl091KvsMzgjW9pEB8TApqkK+uuzvTzdNddR6NBaUFsHha8LHaKI/uMn6Rugql40s53PoUtKZ4pd5RDEVFrxs7UQ9PsYkhBgwSwcbUUNkOHwyQsW8lXAvdmwmCalDEf8XyIBr19gEyS81YNaI8SmzaZyOvcubK72aO8mG9J7qXjf8ShJg9huODBL+2C98FwLL/pCO+DyImg03tC+hGvWV4UAvMfXUAPORMb4B6nCkCYzW3aViMZ3c0EidxxiqOlo7y19Rqf72TWhVRl2IvZUFDGjRQKdZwUSzCcsQXoSWI3F+p22fx9GgmsMmshZcs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3MBjHoBRdmXVydC5T8Jeb5OoOU/OSi3zhyenNUgGZNTyfLXoTkhdhqleVhJcDpLO6Ir11yhF1H47Pnww93pZ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2018 13:14:20.2212 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 62851096-91ce-4032-19be-08d614c3d2b8 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR02MB4934 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 For stream capable endpoints, uas layer can queue mulpile requests on single ep with different stream ids. So, there can be multiple pending requests waiting to be transferred. This patch changes the code to check for any pending requests waiting to be transferred on ep started_list and calls __dwc3_gadget_kick_transfer() if any. Signed-off-by: Anurag Kumar Vulisha Reviewed-by: Thinh Nguyen --- Changes in v3: 1. None Changes in v2: 1. None --- drivers/usb/dwc3/gadget.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 6936adf..e9901cc 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2424,6 +2424,9 @@ static void dwc3_gadget_endpoint_transfer_in_progress(struct dwc3_ep *dep, dwc3_gadget_ep_cleanup_completed_requests(dep, event, status); + if (dep->stream_capable && !list_empty(&dep->started_list)) + __dwc3_gadget_kick_transfer(dep); + if (stop) { dwc3_stop_active_transfer(dep, true); dep->flags = DWC3_EP_ENABLED;