From patchwork Sat Sep 8 15:03:04 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: 10593107 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 1DC5214E0 for ; Sat, 8 Sep 2018 15:03:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0116B2A773 for ; Sat, 8 Sep 2018 15:03:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E613A2A775; Sat, 8 Sep 2018 15:03:28 +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 44C412A773 for ; Sat, 8 Sep 2018 15:03:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727623AbeIHTta (ORCPT ); Sat, 8 Sep 2018 15:49:30 -0400 Received: from mail-eopbgr690050.outbound.protection.outlook.com ([40.107.69.50]:32256 "EHLO NAM04-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727598AbeIHTta (ORCPT ); Sat, 8 Sep 2018 15:49:30 -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=0O1pAwwtY+ViNBJ5rrNdOEbwp7dfAZ3afMgsGOUvz5c=; b=5NC44j2QORbuC2QxYHdUyqKhenx6/sy0WBe3+T5mAGiwxJ3iRuaVIC9WP+W1b7rps0Pm2M74/BECXL2a9cCe8eNYgKIP6SQ5V90qP+j9j3ghQz2UCGEPYfMS2sEuaO6q28B1iN/hHciwlKFitmY6P88pr5ge4uqpqCWJKqpD0Kc= Received: from BYAPR02CA0061.namprd02.prod.outlook.com (2603:10b6:a03:54::38) by BY2PR02MB506.namprd02.prod.outlook.com (2a01:111:e400:2c39::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.16; Sat, 8 Sep 2018 15:03:22 +0000 Received: from SN1NAM02FT007.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::207) by BYAPR02CA0061.outlook.office365.com (2603:10b6:a03:54::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.15 via Frontend Transport; Sat, 8 Sep 2018 15:03: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 SN1NAM02FT007.mail.protection.outlook.com (10.152.72.88) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1122.15 via Frontend Transport; Sat, 8 Sep 2018 15:03:21 +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 1fyeld-0002ck-2F; Sat, 08 Sep 2018 08:03:21 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1fyelX-0004pQ-Uy; Sat, 08 Sep 2018 08:03:16 -0700 Received: from xsj-pvapsmtp01 (mailhub.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w88F39h7027675; Sat, 8 Sep 2018 08:03:09 -0700 Received: from [172.23.64.8] (helo=xhdvnc108.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fyelQ-0004od-VD; Sat, 08 Sep 2018 08:03:09 -0700 Received: by xhdvnc108.xilinx.com (Postfix, from userid 15427) id 0C97D604FD; Sat, 8 Sep 2018 20:33:08 +0530 (IST) From: Anurag Kumar Vulisha To: , CC: , , , , Anurag Kumar Vulisha Subject: [PATCH v4 6/8] usb: dwc3: check for requests in started list for stream capable endpoints Date: Sat, 8 Sep 2018 20:33:04 +0530 Message-ID: <1536418986-16609-7-git-send-email-anurag.kumar.vulisha@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1536418986-16609-1-git-send-email-anurag.kumar.vulisha@xilinx.com> References: <1536418986-16609-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)(396003)(136003)(39850400004)(346002)(376002)(2980300002)(438002)(199004)(189003)(107886003)(446003)(90966002)(14444005)(8676002)(47776003)(39060400002)(63266004)(6266002)(76176011)(51416003)(426003)(2906002)(486006)(106466001)(126002)(11346002)(2616005)(36756003)(36386004)(476003)(52956003)(305945005)(5660300001)(356003)(103686004)(50466002)(336012)(48376002)(6666003)(106002)(8936002)(81166006)(50226002)(81156014)(26005)(4326008)(54906003)(16586007)(186003)(110136005)(42186006)(316002)(478600001)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR02MB506;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;LANG:en;PTR:unknown-60-83.xilinx.com;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;SN1NAM02FT007;1:9GUnu3Luz5feVH2SqI7sECC7p/4QFlu0sUSnel0/hlgnP1rxoS6gEoA/SZaxFfwzNUbvcs4AcAqWtfERv1rbU12cqY4+vQgJpgH8wVvjEwcORAjKlAlCyVU24B/wKGRd MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5c60efa0-a862-4a43-9074-08d6159c37ef X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:BY2PR02MB506; X-Microsoft-Exchange-Diagnostics: 1;BY2PR02MB506;3:PiARWVues8FBRTpSo0EpKhboXEUt8bH7RSyHXyXTUqKHs60gAY3EuWt132jakQr/SD8EOFuyx6YVV/SPH0vsOnxpU78D0hjx/mFhgelmtxCd6jsbSKmvNjzg7gbLMmtrzeBi1rVOElE9rGlUKStI/U9NyPdF5Gs0kKpBw/ZevnKN+CUS3wFGgOquzgU2xvN5G0ci3w9baGGuy97oe/UaCSaDOwuoe95/MbFkLckLG26VAzaA6gqIqB0EI318GAwzz+yT6AjUloEeonDTApiBzPGnhlgDsJQ+4Fjee2OJ4xsFGgT5vyvF41dg8Q9hx539ujIzWR2HEJTlP/06F2lR9/qPFn+5tqGbqHkaSfRA1LE=;25:h0ee0WQ7NGQVSy/LZ6zd+hHSxKqclFEotDJaKA2wEFsc6OEagXctA3r9/vAWhq9ZZMPjuT8OQkEi09Yksg/JTIUgXSecybfxQ1rc+4Je88dpASvH9F/zTbhZBHz5xPOIy+QzzbOp490VhGM2KsS0eOiWsdUEjCEch6JR6rKlgJEwQ40dqW3uQPsUWXKdCMkNgtsCldsKcLUrU7joJwSc7ToG89tE1fRWZRdtt6ESe/u7rtRDm/ijVpRYVmCAJvZ0Z/7VYpfT12+MtirU2YHKNVv+3r1bLAoszBKCEELSs+zs+zyz6rg9DFQ+hMCr9FlUnnEn+43J5RM4dDPUEB7uFA== X-MS-TrafficTypeDiagnostic: BY2PR02MB506: X-Microsoft-Exchange-Diagnostics: 1;BY2PR02MB506;31:+oXE7FfOKfzyOnTPBhUkcC5TFrmoG+2VTidTHdYp/csz7EnAylW4JgtYXBb2JGHBFEn9vHES8uzXxm2HwDi8DdqgGnsELswHGHKas153GjL4tk1ODkg73I1/ZcyncTbwKoy+VJ+kOVSxjKio3MfbX22ne90AVsRuxBaQHTvnIOX8gFlVxwupgE2HvS0Zh47ovruYVOZA6D9ZUbRa9pOI4Ml+mvLq64XFFxeSzoRjLAc=;20:Bd6x9iWxjKV7juM3J455PtkBU1e6ArZeWWKLFZpOWZwQtYAvIG+MvqsS842aivLZM6B6I6zpCqP8J+wlozP26OMKZhMl7hvn10u8wD2jE4M/vi50LNThMPImzzxahBO4g5RiQ0+GMUQhllq/4ob5Iljc+EPZIuiLGuAaJNOCih2tyJtqw1sTlRgUJTKRimalhAb0JiJIRu0HoIPRJe1KK6411W2nZAjJFKAqKs7i7hBN1I2+QqG1Vs1Fkj5RTZBkgH4+pKTq/BNtuJVQtpEfX8ZbaScsywEPneOB7qRwXYNz7lFLUQpLVuGZ53xidImR4no93eGOWFM//PB1SgKyb+fWkp2KPxmWXHtVgMMJT85bdpcvMNkn4CEwtdCS3XCtgi3bHBb4OHr9bW2r7CSfB1cvIex/7NREktgJxD0oLyvwOhmZvFPkfqCTFU79JQnC58PxuLczvZa/JZYG86hBNdg9KKCeBPy2Q++e+4q2RLO+VxJgzuEk19fDwZk6Tb2Q 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)(8121501046)(5005006)(3002001)(93006095)(93004095)(3231311)(944501410)(52105095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699050);SRVR:BY2PR02MB506;BCL:0;PCL:0;RULEID:;SRVR:BY2PR02MB506; X-Microsoft-Exchange-Diagnostics: 1;BY2PR02MB506;4:5cXIxT0PHNFJSSxCKqYpSaf3/a3MHKtQKn7PHbW7RLOxM20UTH5tbHg5egQ48UfyBe6dws6sOOaz1RG3T8qZ99FqQw1fp59SVT+hCunhDmNYcS7aN39qZLlDnEMPlNfLK5mjEiL5oPb4GuzqLThZ/7DWCAxULiUWhHOfu/L7JZc9w+J6P/z1q5Pt3BXanjI83KUdhO7TNQEWC8kiX7bIhwAQjL75+sqIhOaigk9SpGXKFu6G4D3Lrm6OWr8x2ICx4v4+V0Xibd7yz5obzs/8g+i2zaVZV0xbNbR4gum51QWPHKiurOiXzaY5KiuYMH21 X-Forefront-PRVS: 07891BF289 X-Microsoft-Exchange-Diagnostics: 1;BY2PR02MB506;23:E4LMQEUm082IhIjeb3mGBPXCYRdGkmEnk9noBU5jBNXYQTO5HqkMgf92jCBlRzYgJMUTr1qALaLC4hwfLYYYU1AhO9pUnqFXAlRaJqqMHDPsJfb0jKWa9pwDZy9DJYwstc0nvNdU5dsJGwK8hfX9z3dhq2r3SC4g2F4Tm0tMqQLevPFL2fCdSly0sKbZu8VkWP0vpZf4HE0E7p9paqoPhy4WfpHEa58V3g19PXlqAa0r/O1MVXZTrnjR0Yh2Iuyr9Qyps++b9qszJoIkPTDo3jwFuyUpL+YW4+F9u26LECq/g/ZfgS9epZ0D90aThi5V2J8xGBGblp4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L2sTFHZK3OpZmyYS7z1wn0OkURVnpS3+uaT8+uV34Gh8rRzfg4g4fWbVUG3xsxWfLAGMWrzXY SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2018 15:03:21.4219 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5c60efa0-a862-4a43-9074-08d6159c37ef 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: BY2PR02MB506 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 v4: 1. None 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 97bfdf0..c50cad8 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2433,6 +2433,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;