From patchwork Fri Oct 27 18:39:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 159117 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp809830vqb; Fri, 27 Oct 2023 11:39:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGBW5Gqys0OwiPDAeNcl7oisE9vrSfy8oCLZAOS0wiIcF1g2Qm5on8lTma7x8if3SFiEObZ X-Received: by 2002:a05:6358:720a:b0:168:dc41:b7b0 with SMTP id h10-20020a056358720a00b00168dc41b7b0mr4829181rwa.0.1698431990101; Fri, 27 Oct 2023 11:39:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698431990; cv=pass; d=google.com; s=arc-20160816; b=tzvJwyEedmwrQAqP36zlaahuV6Kdgy31I4RMfk6MBcya7zW3xi9s4ekrmNwG/5RXfT a4DJRGinBCn8/ZI3nVMbvbn6a1SA4TfcDOFDBljf+P6i3lSWUbqXIJfq6bRZg+Hazb4p Ti+XhpUOL4m8+DBi5yg0PVb+8Zi3QLmtgsIwBjAgjFBiORveEn65F60C/ExohZpLRniY k5tfT5FW36h6eaO8X9ej9YCYd0hlyW2TuSg0/sIjenX9M0rrBDk4M6XWPdmDCV03txac ptlWeoV7GlSSHi0xcBlv1LdE39d0+6M8IcBADXNm1eIlTehpuDQ8OuNsrY7qn2OlCcYj RlAw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:to:from:dkim-signature; bh=a1ZQ1XvEkrhkMMzc+DSUrXBJnED9qfMmknHmI9nD9MM=; fh=PoTC2hEq3EhEpGY6ODEKPc4s2LoD/aa3Rw3mT5Gc+pg=; b=Q5dE2aF3F9659/M6+KOIwSEuT6V44F734cJe58TU96z028srGFr36TXws6By62BM9t +NCJO1kpxfIx+r7OmAb2U5iRJF5u7zkSud+K/NuN//3NpnRZkQ5GGkJSlq+cl7ue52mB kHJShwfoJHd2R54I9lVH7Wsa3jDz5CgZeAHPo+Ug0Rhp26Ka8sugL72PIDrGzfh5OYog U+BOyGtGD9dLAlmdOZjacqOW+ybq7gPYj1xscws4YuE0eHn9XW/22YgwDdCjDW63S/HC PUXDpfLtXy1wrExmf4PNht14nBFZK57F0T+QUp68Nx6W6K/IokK/aHujiQs5gSklqN8L cgkQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=JW+j65J6; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id q187-20020a0dcec4000000b0056d30f9cce6si3148560ywd.426.2023.10.27.11.39.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 11:39:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=JW+j65J6; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 8C616806139A; Fri, 27 Oct 2023 11:39:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346356AbjJ0Sjj (ORCPT + 25 others); Fri, 27 Oct 2023 14:39:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232685AbjJ0Sji (ORCPT ); Fri, 27 Oct 2023 14:39:38 -0400 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2040.outbound.protection.outlook.com [40.107.8.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4689712A; Fri, 27 Oct 2023 11:39:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jYY7sE0sVKrf3YsPB1FPW3f9Ch1aUCpcDtA8+icdz3CYGaIq+X9xGS9PKjgBRGnXzQ49LUK1kqbsvNTzOip4IrtgeYthyzIr1SnqC9RTgd4zEcxsS1UVro6WqTlECCz6AxfBLi+xTZSk6iWT6LdNomrmvtTct7DQIwxva6M8Z1XMfKgBX/td3Wkb5lNuBYGFcdavOlqxIQH+RuyHeVlXTZNY097yhaHbOTwNMrINScPIkcH02BYlMt5N+r9QXCegCzahN7sSSlKinlI9+3KMf3I45xqaTY0WrPFZKGqt/e2Jq0bP0SZKDACfUREjctQW55PPkWhh6Pm0oVjJV3Sx/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=a1ZQ1XvEkrhkMMzc+DSUrXBJnED9qfMmknHmI9nD9MM=; b=WaSQl8QAfgr86Q0TR2W+/a6s6mCtIY0hgDINT1dTMPB52s4M5vv3meQ2tvqXu4lgV1u8/+lEVxFxdx1QExA9OPneP4MgbIUIhGafCxyfRz2orZJiIGZ4vEedU7fESCT3341oEFIuuUXfQVXNJL1jhmNBJBsqITicZ8qVxULSr6C//TMVcCs3bRGY0Qy+xCSQoC2TlOjTLoxI/HyToZUUzzdJZ0TLoyqK9U4PUiBK8ELAoIofq18kEWLEgCUxrNFByFgVGbyv1j9MHnHN37yYS7Nh1GEzk+ZaTimRwHN+F74bSVOFyIDjxMuqDPbABir66lUm0q9as1kBAu9Me5NNbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a1ZQ1XvEkrhkMMzc+DSUrXBJnED9qfMmknHmI9nD9MM=; b=JW+j65J6WAR/v9MU3JVspXn+C49l7iL5YWE/NR79k3301X5HwEtwse33l5Oi3UM1oVtf8qXBR4GGzpMSroulJHzFTMyQmg87EDl54MVtpDEsBEdPQHl6JcZiWwx0XLqAQ3CR0w5pEhHUdG/VpL+LUbv6uOnkFodwqfFjjqsNJrs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by DU2PR04MB9196.eurprd04.prod.outlook.com (2603:10a6:10:2fb::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.11; Fri, 27 Oct 2023 18:39:32 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::97ca:a905:8e64:c098]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::97ca:a905:8e64:c098%6]) with mapi id 15.20.6933.011; Fri, 27 Oct 2023 18:39:31 +0000 From: Frank Li To: imx@lists.linux.dev, Peter Chen , Pawel Laszczak , Roger Quadros , Aswath Govindraju , Greg Kroah-Hartman , linux-usb@vger.kernel.org (open list:CADENCE USB3 DRD IP DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/1] usb: cdns3: skip set TRB_IOC when usb_request: no_interrupt is true Date: Fri, 27 Oct 2023 14:39:19 -0400 Message-Id: <20231027183919.664271-1-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: BYAPR21CA0030.namprd21.prod.outlook.com (2603:10b6:a03:114::40) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|DU2PR04MB9196:EE_ X-MS-Office365-Filtering-Correlation-Id: 68056964-25c0-4e95-1166-08dbd71c0f10 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uh0fNC6eVvdI46Dc3fAwey3TsNbhduWDUtyLrdJDmzgomAoECMK0mXElI2AJU08CYOXXKIR2Wytb9iPGANLo91Mtx8Z2wpcX0wrf3PtIKwhI01XYxmuVPJEr+oxep9+rF3k/PFmBWbgyXF/cOeqUsqaEC///Bgrgulrc/pVmcA9Mv39LUwMdt8Huv5lnzPyF+AiHjsDyDCIY3Vvvw+81UQ/1CN3/h9wTTfWOgHcZZehuV/gaeuH5mv8zJf9Sc2fsVUQkUeY+Bbk+3CehnfAPC1K3Zo8T7wGT5TyUAN2utExioR9ydyDQzBH2PRDstYKMCKzkQeQdd+4CwUeED4OO+eYwmvkELxJ0FpztUXtO+yq822sLElwPPXDE0l5HBSaUtaZ3dMn/lC0heeDd0fsOz9O0jKRT13XdOy3uDfM+CpOQJOHPnAMdmLhznIkiZlVos5PJKkgOSq0TWcNPFeOH+ybtKJLfn69AWHIb3upMczFtfMUGxbrXbOS0IjvlVuvVqtLUx04OmNkHPhiVt6n+E0yrDYIb8dmgvVRrixrSO+mWiQB5IUwlg0jAsZGWLV73pDjGg6fnBJhoZyx9ga+8tjQptyhMNEzyHiM0ECgCPAOgqVc7oq/6QNkPLciJLTjUhejs1cN8geX9iDfACDKuRKmsfmbum8XuT84iAQAHZ2I= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB4838.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(396003)(346002)(39860400002)(136003)(366004)(230922051799003)(186009)(1800799009)(64100799003)(451199024)(1076003)(26005)(52116002)(2616005)(6512007)(38350700005)(86362001)(36756003)(38100700002)(83380400001)(6506007)(478600001)(6486002)(6666004)(2906002)(8676002)(8936002)(41300700001)(316002)(110136005)(66476007)(5660300002)(66556008)(66946007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TQuUYNF+QwDTojnCqVsBeZmDUrJS7t8Cx7Qbz2E3fLBf0enZWR2liSh4oJ7Xqptgfz00uZ2s04oKJ9mpEuSGmWBTbwvXAlsO8R9vIjxsYnHk9thxNNbB714OnBD8JfWOLk8MHpOQzGP4/ErVaG/nItRdrpXTe1OM1AuQLRU2iAetsz1mR7eiqAkNkoBHNDScZvtovhvOXnM6VleaACB6lF1lxhGP2kQyj+WeberiirQKQi+95Y9XLiT3kFtE8qCg+gYA7+N4aUwsjK3aQc1ZEZtMWb25ywNeqSHfk2P9ZNaK09+m8hTHX//wF3WYiAFVhkuDhrX58u81bKmGhPcz3vk8lvf9ih5fqcakVFbj+j9jbBFoMGMo9IQZP7BY28Q7wVC7Fja14+zX03wm94v9yMuMXADmL9+tKCTJtVzC8y2TRfYynr2DXPF2Cu7HNALywtqyP4oBRDJc1L0ptr1XEDzwHl5up9W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GwJgQVLqz+1l7wp+nE1P4339b4yKbeBfWjtR1a X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68056964-25c0-4e95-1166-08dbd71c0f10 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2023 18:39:31.8586 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Czg2pLSrutwGmDMzA5u7SiCTWDfPwrfUwGivTUPVsdfEFVYeqSLBmppACtDJlwnL7OkIBcQ9RxSMLGmgkt1pWw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB9196 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 27 Oct 2023 11:39:47 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780935022622952584 X-GMAIL-MSGID: 1780935022622952584 No completion irq is needed if no_interrupt is true. Needn't set TRB_IOC at this case. Check usb_request: no_interrupt and set/skip TRB_IOC in cdns3_ep_run_transfer(). Signed-off-by: Frank Li Acked-by: Peter Chen --- drivers/usb/cdns3/cdns3-gadget.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-gadget.c index 69a44bd7e5d02..cd08897f8da8b 100644 --- a/drivers/usb/cdns3/cdns3-gadget.c +++ b/drivers/usb/cdns3/cdns3-gadget.c @@ -1124,6 +1124,7 @@ static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep, u16 total_tdl = 0; struct scatterlist *s = NULL; bool sg_supported = !!(request->num_mapped_sgs); + u32 ioc = request->no_interrupt ? 0 : TRB_IOC; if (priv_ep->type == USB_ENDPOINT_XFER_ISOC) num_trb = priv_ep->interval; @@ -1233,11 +1234,11 @@ static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep, control |= pcs; if (priv_ep->type == USB_ENDPOINT_XFER_ISOC && !priv_ep->dir) { - control |= TRB_IOC | TRB_ISP; + control |= ioc | TRB_ISP; } else { /* for last element in TD or in SG list */ if (sg_iter == (num_trb - 1) && sg_iter != 0) - control |= pcs | TRB_IOC | TRB_ISP; + control |= pcs | ioc | TRB_ISP; } if (sg_iter) @@ -1268,7 +1269,7 @@ static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep, priv_req->num_of_trb = num_trb; if (sg_iter == 1) - trb->control |= cpu_to_le32(TRB_IOC | TRB_ISP); + trb->control |= cpu_to_le32(ioc | TRB_ISP); if (priv_dev->dev_ver < DEV_VER_V2 && (priv_ep->flags & EP_TDLCHK_EN)) {