Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp99426rdb; Tue, 31 Oct 2023 01:46:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH/KpqaOekFfI704EsW86xlZmtN2wjpOkeMSL7M8pHAm2WMlmwvuOnwSpHFIXd65cqqTqcA X-Received: by 2002:a05:6a20:12c7:b0:138:836c:5370 with SMTP id v7-20020a056a2012c700b00138836c5370mr11467505pzg.42.1698741962484; Tue, 31 Oct 2023 01:46:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698741962; cv=none; d=google.com; s=arc-20160816; b=IQ5WbNGGK7HPHREi5i256HlmsHXaR5KYjM3i9h8fa/qSNiIYyy2jG0RPjk7hIGRGaZ 6FwXjsuBsyCaCOUXQ2qfW35XhlxzVU5ea9C8hQ+5GXr/7ftQY4qe0ZjgMe3BwzImlIFc x6w24V68q+dvedNnWN53DHjeA7zKSXDjGzLP+IbKUZbo9QoKULFsjVLESJzyu6wNtkUJ 5JWTKM1PuqGsS5/Q1YT7Wg9piS2uvFp/EXdbHtrXZfqJCl567sU6Sa1r+ag3Df/UkUyu U+WOX5weFWE7+VQsfLFbi+y/2NetQ/qiKpNaaRB0F+ogyaXYFoSl0IyGKSCbSXDISScj h7fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zJYqz5zjoCzR+b2HDiqyd+Oj/VHHWHCPr4DlTayJB2Q=; fh=ArSb3vIawzZo6dUug5u76ykUXtCpwui7Eka4oO6BoaM=; b=Z1I5rUKPDQrfGX4zZy/Mx73r+DoIsCXLYbpr7ZG5OCRDJIGo0vFR2HegzUk+/tD4tT riWqFYm1JHMOgdhi0Yi6eHrantC9vmPYAXdGVYuba3fRwjVf9GBNhOeii6WAh5jpS+GU 3vZHSq2vhfaKjlHA9aRGucPrP9BEHapM17gIPZ6Q5iUy/cKyTnCIPyDxI9wrb8982RCF B2f8cGaMCShVYLzl5JTduUUem/5O41a9soKmyctHBvOdEnKf0IIIkHE0RrddfYXPUpUr o4dTbZsZSR9ySvO+yYcp+98ilC23IT7kBs98oOwa3VrMvGgXzWI/hJ9b7fiOQDt+XJ7B /bFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kFKGwLq7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id u76-20020a62794f000000b006b3b20ef167si705362pfc.172.2023.10.31.01.46.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 01:46:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kFKGwLq7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 051A2805F3EE; Tue, 31 Oct 2023 01:45:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233576AbjJaIpf (ORCPT + 99 others); Tue, 31 Oct 2023 04:45:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229888AbjJaIpe (ORCPT ); Tue, 31 Oct 2023 04:45:34 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C75FD8 for ; Tue, 31 Oct 2023 01:45:32 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31203C433C7; Tue, 31 Oct 2023 08:45:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698741931; bh=5wJvna+beQCOoBMamTqBSNyLMYqw9va5g3L23JcTKjA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kFKGwLq7atkoZk2ctNWkWaLtX4huxVdg21TgdNNRR2yAe/z8URE4aL6tQYTYLwbSu RIU3UyLGInK0tgSbcbnImAPdIEfVkRxb7vHp144UVq5OrYD+6MHAGUoRWcf1VdOuAS pZLoa10u3NM4weaC1sgGuFsFXei+JH+fF/1sULHZoNAs6qJ17aEbgsm5x7wtwAEvYB KpDqxlBZiTvQjg+xLj5tKhJKVJriQNjd8gg+iMOaoCw+Vm7AYrLWxueqSOt6/veZOV 6LsoegmdKO3Ab66D7fzLJW1hiEDt2iBo1Hk51Dx3Fa+YwE7j3VWzEWTen6Ky28l8RY k12bpp2L9Th+Q== Date: Tue, 31 Oct 2023 16:45:21 +0800 From: Peter Chen To: Frank Li 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: <20231031084521.GA1948529@nchen-desktop> References: <20231027183919.664271-1-Frank.Li@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231027183919.664271-1-Frank.Li@nxp.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 31 Oct 2023 01:45:42 -0700 (PDT) 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 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