Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp703098imm; Wed, 25 Jul 2018 04:53:36 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeE/eVPXGjCucjVQsrEI4zg/Zxznwv7pG8T1GkL6j3+Ek6led8ixvTgHNZ7muM6qOPoQnJR X-Received: by 2002:a62:9f1d:: with SMTP id g29-v6mr1258123pfe.207.1532519616518; Wed, 25 Jul 2018 04:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532519616; cv=none; d=google.com; s=arc-20160816; b=DfGPRePgWVUOKi5SiBSLIRKMfpuQVw6mVp4TAn53Fz73V8Pc4/489FsjUUJ7GaACEB BZ0Ux6nprl6ppiuYQdvUFR3jObvZOqZYtffkEeHbnfSyPld9Leylz+xI+VM24y6Af0wY C7cshYeVvPVYTnaUESxUJElCoB+qiPkxFqAb5Odi7r43c7/2B1WjEXV6ySUsLhwv1o9X rqfERhGRUxbXkTeIKS4XHt4rEnKDHhityFtb6i8Qa7L8w/JyEyADJn+fOYKSBrBMLF7e vFCVCil7Fix1jDgIDgLa5+5lK9T8zxW5MUfecSIS47LiPAMjzUfABQc5Riicwk78Kz9F ayXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=5nHdIms80+LkB8kmVniMIrM8KRP2VTQ6zAmQwYn4wY4=; b=sTcih5wszu+lzmCFQyEn+y7GGN23ryVgKd7vaZCLZdZiToIyhmfcaysl5P1DvhpSUt 5CYzHOeS3hfZkCOhbNqzzJyxzK93Nrieg8GTqvKbGaaNiZqhfziippAP5F+1e11q9zXF MTUweV2ASoX3/ubCNQayRFb0BvR5VH7PnisZbDdWHKVSRhChOwPVELrpw8yMkrMDwOm5 m9HMaDvgQBIGiESv7+lMd1+NKBDknXLR242G7iOVIBFcdgSMF9k0AIU/ILpbOuj2P8Vj mv/8HXtlxov8iZiYmDJheVBGcqOgJkM4uaR1HM1LyR74HiCYkQI1/XWeUrRi0JTdqPVt gvdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector1-xilinx-com header.b=ly6lA1rs; 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 r23-v6si14409199pgb.623.2018.07.25.04.53.21; Wed, 25 Jul 2018 04:53:36 -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; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector1-xilinx-com header.b=ly6lA1rs; 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 S1729068AbeGYNDY (ORCPT + 99 others); Wed, 25 Jul 2018 09:03:24 -0400 Received: from mail-sn1nam01on0073.outbound.protection.outlook.com ([104.47.32.73]:38112 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728905AbeGYNDX (ORCPT ); Wed, 25 Jul 2018 09:03:23 -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=5nHdIms80+LkB8kmVniMIrM8KRP2VTQ6zAmQwYn4wY4=; b=ly6lA1rsT8MHMEm3qERYLAzJfdVdP72mCDodUjC3mdB7iOct3BzhhZ0YMnan5xoPlnHVEqEpKoi/NTn/5AHfVp/dUFL5Y4XdCwB2EcHWGMeNMblNufrPyiJQJ3NpaGTi/A9nXXaKi3C8GVygnpkM86DShMc8KomU6aohZcmS50M= Received: from CY4PR02CA0031.namprd02.prod.outlook.com (2603:10b6:903:117::17) by BY2PR02MB092.namprd02.prod.outlook.com (2a01:111:e400:2c1c::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.973.22; Wed, 25 Jul 2018 11:51:59 +0000 Received: from BL2NAM02FT020.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::202) by CY4PR02CA0031.outlook.office365.com (2603:10b6:903:117::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.973.16 via Frontend Transport; Wed, 25 Jul 2018 11:51:58 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) 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.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by BL2NAM02FT020.mail.protection.outlook.com (10.152.77.162) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.995.12 via Frontend Transport; Wed, 25 Jul 2018 11:51:56 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:43924 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1fiIKh-0004QO-9B; Wed, 25 Jul 2018 04:51:55 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1fiIKc-0006dG-6K; Wed, 25 Jul 2018 04:51:50 -0700 Received: from xsj-pvapsmtp01 (smtp2.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w6PBpg7m027064; Wed, 25 Jul 2018 04:51:42 -0700 Received: from [172.23.64.8] (helo=xhdvnc108.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fiIKT-0006a2-Nx; Wed, 25 Jul 2018 04:51:41 -0700 Received: by xhdvnc108.xilinx.com (Postfix, from userid 15427) id 5743B60504; Wed, 25 Jul 2018 17:21:41 +0530 (IST) From: Anurag Kumar Vulisha To: , CC: , , , Anurag Kumar Vulisha Subject: [PATCH 7/8] usb: dwc3: Check for IOC/LST bit in both event->status and TRB->ctrl fields Date: Wed, 25 Jul 2018 17:21:30 +0530 Message-ID: <1532519491-19502-8-git-send-email-anurag.kumar.vulisha@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1532519491-19502-1-git-send-email-anurag.kumar.vulisha@xilinx.com> References: <1532519491-19502-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.100;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(376002)(346002)(136003)(39860400002)(396003)(2980300002)(438002)(189003)(199004)(51416003)(476003)(90966002)(14444005)(107886003)(478600001)(6266002)(8676002)(39060400002)(103686004)(26005)(186003)(4326008)(2616005)(486006)(126002)(106466001)(47776003)(81156014)(305945005)(446003)(81166006)(50466002)(54906003)(16586007)(52956003)(42186006)(48376002)(426003)(316002)(8936002)(110136005)(36386004)(106002)(36756003)(11346002)(356003)(336012)(50226002)(5660300001)(76176011)(63266004)(6666003)(2906002)(107986001)(5001870100001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR02MB092;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;LANG:en;PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;BL2NAM02FT020;1:ITm7HDYeRJhBbqiVTb4AuvqlMnsUjviS5e8coj5gzX8chiqm/onLxeunsbD0tLnYkuOwxWhNWhBcpjQBHtOF4MI01gM1/l++f/G79kngQaEHdLd/Tr1u7S8FadA6BqdR MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 79db40ca-dd6c-4f7b-9e08-08d5f2250699 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600073)(711020)(4608076)(2017052603328)(7153060);SRVR:BY2PR02MB092; X-Microsoft-Exchange-Diagnostics: 1;BY2PR02MB092;3:TZFUVf5/oM+yz7OAJL+J/D4OFavaXsGopMbz2ntDo18jfiKMn5DMoRiNS4yfPA55qRAhD9+pwaISTvwcNmxdm3qcH4oUw/CDyOfX2r6jOAYOnOPl67+ADMk54P54iyiBghEAqRX/z4c+z+mlWPQi3vE27XG+zb5925YY02erMpxsrn5VicLjESRIv7WOfOI/GR8+rL6nublp9env+1geN3UquonNp1gWogEtLd7xJCaixPO2DLXhS3n2lmDFRWWPfGtWjPU+1+5l+18MT43Mo4NkEBihZ7G59GKo+0veTA184J9ji8EhjnqAFobv5PLMSaYyR5z7powyJywM/Ja+P5zQUIrEl5/r9kKYNPSrR0o=;25:hasGpcucbtafUaxkc6MAHifWBlUhevgaUqIjfaIdaK9hiR2hVdvUK2Ptu6sfiJJQWPfU+D2Z+KVjDVfP8wNpSIsbD1JhlTt8BmQ71+DSTGrI+idv5vzQ+vA7p3/eK2IsJcHVnUT8379HR45crkih9JC2AvrebRMwX/TT4X/TKj5sltxJdb8kQLlWejhz8RvR/eB196JBbzkQdKFEk2/3dnHN0DlxnGKAcI525bykyzGYcqFGzzSZO21TkI4t5tl/X+Ej/rNN2eaaWc9EiNoEb4B6L9WPsp8bs4VcK7v7i3J/89jWWoYKbnqbS0vSOKbPdSAxlZ2BqdPIl9fg5XbJQA== X-MS-TrafficTypeDiagnostic: BY2PR02MB092: X-Microsoft-Exchange-Diagnostics: 1;BY2PR02MB092;31:NwXAQ/EPV/wGIJBPxCM7ucu2vu+VphF+9HdK75+hbpfWaZayBNUM4LMHcIL8ep30hLu7j+om+DKf1O2aKfCEvF3S6OgoH3EbX7PHRttVTNE1lRX7RHyfbMzIVZ8hNhGG3DAeuHFpFlKXAB3nvIhsCSz6gYgKzC7W809FbhKoo5Birt7U2zCfvAZP5vRXJdAhroHQQfDSERrGcfh6sTMXzQ7IqolLDaQ27A/G/tLL+ns=;20:s3eRpnSrteo+3f84GVF+PMgl7BCFMwMWZVmyAFJHzxH/sMf6MqG4qz/70U3jc4CxWqAWmvx2Vb1tCw1xvYLFse7ji3GIx7DlTk+VDlpqUeUNBRbVIoZAarx+wh/qmo4SUJJFdiWLmyjb+OkuQuQ+dGpzrE/o7yFffQXNRMyIev74TOfHEI4Vy92HPhfqfR9bpsGm7YpLizF56lNomrXMT2KDt7kkIw8M3dP+O499P8pGEK+C9P0Dtrr/81a+jiDojmWKq7+zsGekRrSfYDVHhS9fQSSUvXA1NnotwR+T/JCPzSRQqbj7lg7e9F/N6pZWB7PZ/GWc6a5TydOo24mrKZvwClzUS/h2K1/F+uGkGEmvE4CV+iUonFIJYFvZEU6eubfVvoEWjyaHg1/foL7buehMr2eRwJZyHDbO1bdhDJTaZ1iio7iwBP8UPa04BGVwV0XH9E37Cau3neEI1NVdFf/f/xT4OS5egFG3ttTVYlbCMHdJBawQso4JGvnMu7zl 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)(10201501046)(93006095)(93004095)(3231311)(944501410)(52105095)(3002001)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:BY2PR02MB092;BCL:0;PCL:0;RULEID:;SRVR:BY2PR02MB092; X-Microsoft-Exchange-Diagnostics: 1;BY2PR02MB092;4:l9sSZW2nwPtOAC/xloAmCGaM9+mFvGPFbg040359LzBPpUYrY6qx41jliRoUqmIyRaPSJqJyYMmVEsfY7wm9JX7pvBo4QJBPlqD2cOPyDeECBLMzKrDzpPGgDue4pU1bKYL1nPXmUlSiK5BouVOmTtBRDFsuv0SDtDLrNSMN/5WNoo0Dc4WF977nG9HfpMITjtdswb14HUzk4pozmWYkCx8tSQN6qj75VsBrvlYIeBpwS6ShtVWz9NBWkqWMRomTWt7qKbBlJR8lFupF8yO0HfQml5woXbAwoU1Wxfcy7U4VMZXQsqVkOpWU1FPuOpMG X-Forefront-PRVS: 0744CFB5E8 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR02MB092;23:ZbxNrGBO6SWAyISALNpklFlYrIvJbfbi3L6Nm4QkTw?= =?us-ascii?Q?ze/2iiCPL2FFgOUjAAvHvScVhRCimx+sJ0KngBxdD7KOctgkByzV3T/vIhWx?= =?us-ascii?Q?7J+SUv6mZlSp8K5pBAXTqtpqRaQEf0tccihMCHgvDcL3ZPo/3u/9OT11bboi?= =?us-ascii?Q?Lvzu1EJIXPVPhgcmVPk4Y8jBpmxSMysurMrCU49j1W04/4uphpGKRfBdRpVp?= =?us-ascii?Q?O7l5L+HrNW+/S1AHeqxDB0pHM5S+JBQy6MrEJ4rkbiEs2clrZu8VuBrH4Rto?= =?us-ascii?Q?/gazNfmdex/eVLtubkTBFNe068jTMtGH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TXmts2wSPCLS5j8uvU+o45EUcc/aC4fnqiyeE+xZZR/woU9OBLfZQhjVQvCp3g/KbQP3bYt6nkaU=;7:Zhe1lDcI4IhyUnXlGgHz0ialBVAjWWCCAh4gE+W2J8Wx5KId+vSGJf9rEjXN5nK11MWY7gL7wJj4OyYzefXRyhgmH78ndCmxvahU6xtg0Z9N8ou9rTIgaQjqZK1U84UJsyeTD66tZ4o5wHIHJgQF44fs8JRVy9yIZI4e3i0uIDWEI0l4seyZiS/wD1OOX05v9a1TWEbRsjhmb018e/6Nj3vnuG70emMF8KamEX/PiXruQht4tv5XyHjQdp2gqg0Y SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2018 11:51:56.1860 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 79db40ca-dd6c-4f7b-9e08-08d5f2250699 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.100];Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR02MB092 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The present code in dwc3_gadget_ep_reclaim_completed_trb() will check for IOC/LST bit in the event->status and returns if IOC/LST bit is set. This logic doesn't work if multiple TRBs are queued per request and the IOC/LST bit is set on the last TRB of that request. Consider an example where a queued request has multiple queued TRBs and IOC/LST bit is set only for the last TRB. In this case, the Core generates XferComplete/XferInProgress events only for the last TRB (since IOC/LST are set only for the last TRB). As per the logic in dwc3_gadget_ep_reclaim_completed_trb() event->status is checked for IOC/LST bit and returns on the first TRB. This makes the remaining TRBs left unhandled. To aviod this, changed the code to check for IOC/LST bits in both event->status & TRB->ctrl. This patch does the same. Signed-off-by: Anurag Kumar Vulisha --- drivers/usb/dwc3/gadget.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index fe1ea245..1e5cd4b 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2290,7 +2290,12 @@ static int dwc3_gadget_ep_reclaim_completed_trb(struct dwc3_ep *dep, if (event->status & DEPEVT_STATUS_SHORT && !chain) return 1; - if (event->status & (DEPEVT_STATUS_IOC | DEPEVT_STATUS_LST)) + if ((event->status & DEPEVT_STATUS_IOC) && + (trb->ctrl & DWC3_TRB_CTRL_IOC)) + return 1; + + if ((event->status & DEPEVT_STATUS_LST) && + (trb->ctrl & DWC3_TRB_CTRL_LST)) return 1; return 0; -- 2.1.1