Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3151197rdh; Mon, 27 Nov 2023 07:29:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHxSvaeifY3nSqbR0m8UmMVFKUXXKeeT3iJVrwdQO1Hpwz6KuUKVOun+FFjzArQo1v8lLi6 X-Received: by 2002:a17:90b:4f43:b0:285:bc16:611d with SMTP id pj3-20020a17090b4f4300b00285bc16611dmr3512225pjb.8.1701098991968; Mon, 27 Nov 2023 07:29:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701098991; cv=pass; d=google.com; s=arc-20160816; b=Eaa+Rwn16Sct5e4bCsIpvtp+VT5m46tfAk5Mvoxh5xCneXxbU2P+YSk70HbJtyy/S7 n7PkC6tTOkdRsmfsLbQdbys4ZhY88kUix3BjVcZ0wrzfuBdUX8vqZ/rQs/o66XHm/Cbo LEDQQa7j9m6mC41dyrExfB8oAimnhya7UdpREr+tscc5jM+jQxtOREYXprpVhADUFbrZ 7bLwTI4iCfkIr4Bws/iXxaTbma1nJEfoeOZqiJ2wCvyB4He916JvciiILHK1IluWk12K d70AToQrgc//dwVlb1XX1ClsCILb6+pnVElZxeqDmkQbPZ4yLtxJIDDcg529zTEJ2zbO XyXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qUWltBBsIZE4eUYAIWtqNILb3mSl1d9ipSKOn96uw9k=; fh=wfJ8S1HG9nABJlUCSizn4SKzWfqvd2/1qDozmoB0KZI=; b=teDdC99ZLxpMKttC8HIm29uMar2Q/nANdNjpQWAVRiVmJTmLEaGiI+wBJ5ADR+iI0x GBsGeFCMLTGhblvfDQ16kSS9MzWWOktQ85Gcl5ZLfvYxJAofsD0sUqBSojC2QNTt2S9n aN5Xw3wK6NcEgY96rFbINZKDl9l++zhHhOBr+nQeVMwiSeBuJhwfNx6bIRGKEV5dUAR1 nVZTfrhQDJkGK2whz73zJ59Xzw0PRkZAq9fvpHAuS8ybWMhlUrgSYqymar6u1Z2RyIl/ aZd2FXwIdzT/ENQol/YEXhzhizv71z6z76OECNLl/6MsWO9zGLsp1J17PN+QKQtWb5D9 Er5w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=AahtNgUD; 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 Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id bb23-20020a17090b009700b00282ecb475b6si9762527pjb.174.2023.11.27.07.29.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 07:29:51 -0800 (PST) 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=AahtNgUD; 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 1155F806234A; Mon, 27 Nov 2023 07:29:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233987AbjK0P3P (ORCPT + 99 others); Mon, 27 Nov 2023 10:29:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233965AbjK0P3I (ORCPT ); Mon, 27 Nov 2023 10:29:08 -0500 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2089.outbound.protection.outlook.com [40.107.6.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 457D019D; Mon, 27 Nov 2023 07:29:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QXYANBbNHM7VweXHp5cuoMu9Wl+B/VT9akN9jPH/rd4sS4SjUEC1CfL2BOEOaZyB49VsSlNoYCWqCsrdrkjIUM2/6NPP5KCiwDVM553b9oOCg9tKGGh78xYd4n4gIM8qKDC/FrPiq7A5609ym0T6ggImXZupbZq6YWGEfyjLR+NqDqtY7ysh3JsYMZhUajxZT7PT7LGnDXecDDLDetmXvBfvDbM282hJSepJAiuQ6tKC5IGXOORiVppTk++27PcUgj9G0UIY+CPaEjQGJJ0y2cBHobMiQ+Ky2VvG1XaGzFfSCbxqKDC/02R0ANAjXTcJD+KrDNqHX3y0nVavvSelAA== 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=qUWltBBsIZE4eUYAIWtqNILb3mSl1d9ipSKOn96uw9k=; b=hviesataSvTUlpOwVF07DH1ikyLKM4WGEForUwTh4YjC4fTPtpuBSt2Em3DJA11CtTpQFGENOjDNS3NUwmLiXafj4VSFPR0nI63U6qX2AIc9DiAYTzZwAedLwNRgW4Bf0EIYBXZWp/KUJnqCd2zATFpOuXuF7uQ4YklHAwwL2BLmAMSnwpQFz87fuBdWqyXYUD+RU8iPE6GOhefd8yB9b80A3YvJ1aakUTqhn4LlNEmtU4COtMu6kzEKNC/CP8ADN3Y05qSk/sWmWTKb5IXfbYTs2jm2YgEGNdt0na59OrucaQgBM8w0CoNmTnBi43sGLWy0+7wDkmr4FrI+emIenw== 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=qUWltBBsIZE4eUYAIWtqNILb3mSl1d9ipSKOn96uw9k=; b=AahtNgUD7e8gc8PNQqKMHjvbYHZ0KLdBJ9pqcysv4lBqdkSYLMXLTxip0hC0lIWsfIWlW45ZsJI9XUHT5jXPGLRargoWeVL9g+PRYx4glh+FTLD/cnzEpPtLJsYeTnlwMyuznF8ntiy/PIPlLA2IVscCqokOz7A5607O+pvFbpg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB4845.eurprd04.prod.outlook.com (2603:10a6:803:51::30) by AS1PR04MB9456.eurprd04.prod.outlook.com (2603:10a6:20b:4d7::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.19; Mon, 27 Nov 2023 15:29:07 +0000 Received: from VI1PR04MB4845.eurprd04.prod.outlook.com ([fe80::6410:9a52:b833:5bc1]) by VI1PR04MB4845.eurprd04.prod.outlook.com ([fe80::6410:9a52:b833:5bc1%4]) with mapi id 15.20.7046.015; Mon, 27 Nov 2023 15:29:07 +0000 Date: Mon, 27 Nov 2023 10:28:57 -0500 From: Frank Li To: Peter Chen , gregkh@linuxfoundation.org Cc: imx@lists.linux.dev, Pawel Laszczak , Roger Quadros , Aswath Govindraju , Greg Kroah-Hartman , "open list:CADENCE USB3 DRD IP DRIVER" , open list Subject: Re: [PATCH 1/1] usb: cdns3: skip set TRB_IOC when usb_request: no_interrupt is true Message-ID: References: <20231027183919.664271-1-Frank.Li@nxp.com> <20231031084521.GA1948529@nchen-desktop> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231031084521.GA1948529@nchen-desktop> X-ClientProxiedBy: SJ0PR13CA0067.namprd13.prod.outlook.com (2603:10b6:a03:2c4::12) To VI1PR04MB4845.eurprd04.prod.outlook.com (2603:10a6:803:51::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB4845:EE_|AS1PR04MB9456:EE_ X-MS-Office365-Filtering-Correlation-Id: 1ad2a7af-da0e-4ed6-5217-08dbef5d984d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /fGPnU+TxaVY+JlBCnxTkf6H77Knt+pi6gZgW2TOA476SU0SDhJqxleUk1MxtIAVyzwGWqqVsdCiVrnXMMEBbNDfplDPxMQpO+wS9sWYcZHLNN5xFSmsv28tA658/L4GxTWRgkmAcvksPp/TmGIYY2x4qIdZDV5BHfgi//jn98ly5xFRhSp5vEh7wsVYvhLK3fKCj4aBEjHQw8SHbh8RZwSIhujyTY9YRdPxjh1EIfEws3NQxpsF9kRbAUber9dpCrdLHWOEgCqm09j44ENSwk1hZOzvCG6UB9ureEUIMplk2QuBjxD6DpCPt6xoq/lm/kVIvxMoo9y5i6lI9wqlWuWGGj+uSEHCwVeNSfbO7uAUFmuqoHkaphth5dLOGzCOlYFy/GZGi4g9jaxUugP2IQKspMi6jz+QJzKpUR/BXdzUFFrlVd8brT/07DVabqXWwb3sWakP4sMLUg0SvBamoxLL/d5JABZHn91kSoF3BcYp+MytAjSoyJPmWxWIGN8dVIIOy0N+RVLxnfy/zhx3slxtxN8dI2d4Lt2lOLUzJ+BM6dWWxD9gErIy8l05XBYpL1Mb4s0nZxqIrw9IVoY+xPUMmihtbUZAzcBtbsOTMSL7dyK0HwOCNFRTTvH+VX7m X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB4845.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7916004)(136003)(346002)(396003)(376002)(39860400002)(366004)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(38100700002)(33716001)(38350700005)(86362001)(54906003)(316002)(66556008)(66476007)(8936002)(8676002)(41300700001)(66946007)(9686003)(6512007)(53546011)(52116002)(6666004)(6506007)(478600001)(6486002)(4326008)(5660300002)(2906002)(26005)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Gwd4fPMcATdQDWFGRtynUJdrVRVcmS89LBa/JWFi89zamPtrtT3tmnaG65yD?= =?us-ascii?Q?wcbK0VTICdbJsEmbeY0up8cfNUUUWkjizOO2AZI0oGcxmcXYfTcWWa0tYO8/?= =?us-ascii?Q?ZwZTxPtC7fF13RbxdsIgRsgaboTiUDL8/TwLg7MRdeH3CNF36sxJlfLrHbTa?= =?us-ascii?Q?zRzbIxh2+Ls9DqbjtAlphbkbGxqhUoo/TK2v5KiRMRtB2i+J+V19OXJxxEE1?= =?us-ascii?Q?GxCmceU7osFiNy38zb5zNQw2EsY6jKN4EYHMEUcdBaug0gbtTsGTKDvjthsZ?= =?us-ascii?Q?k8A9JB+DW3AAFuZ1BI/wNA2Kvj9zpN98GM/v69HErHR/hDL+QXQxvJ3mFZ8a?= =?us-ascii?Q?/7PDD11IpsC1pymk9UbqofxoJQrsmastwqsSAr45LblUzjpUOji+mph8NsXG?= =?us-ascii?Q?FJwlsRQeIqFbYnAm+lPEfoQSaZmmPU4Ontz6Wn1D4q+9GZK1J8yJfMIOqX45?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UWjLmfDFQZtwO1X6p29/BIx0W1?= =?us-ascii?Q?i8S1CUEzpIf0WX/wgWoDz0q+09vHaJXwl5KbsCizu2jfdii8q8yAqKecYQio?= =?us-ascii?Q?5Q2tlKie951JSoI5KSlI6tkYYjNA3EN0wrHDDPqVcy9sTIHLQcZHriD1jR89?= =?us-ascii?Q?rOYnYanbu659ZT1/kQFsMbwuSIXkbt9TWl8dsASNLz2nlqd4GPSrnzxkTZ8r?= =?us-ascii?Q?absXwUl+bxIX/RtZ1S8=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1ad2a7af-da0e-4ed6-5217-08dbef5d984d X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB4845.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Nov 2023 15:29:07.1181 (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: vndQcXH6hQcj/8C9sHW+tzGSTsAZ0xftpOD5JRMEWBh8VdkW0rBRpeR9Srv23QsdsFbAqtzEV9WpmuswC6x3bQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9456 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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]); Mon, 27 Nov 2023 07:29:49 -0800 (PST) On Tue, Oct 31, 2023 at 04:45:21PM +0800, Peter Chen wrote: > On 23-10-27 14:39:19, Frank Li wrote: > > 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 @Greg: ping Frank > > Peter > > --- > > 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)) { > > -- > > 2.34.1 > > > > -- > > Thanks, > Peter Chen