Message ID | 20221128085005.489964-1-j-choudhary@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5520708wrr; Mon, 28 Nov 2022 00:51:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf5wKOurwHCpWH4UMtEitr9efN9OfyMhuLjelmE4lX79UdBoqxVPPGvRWEW92XDXk6nknrHF X-Received: by 2002:aa7:91c9:0:b0:53e:7332:709d with SMTP id z9-20020aa791c9000000b0053e7332709dmr34975465pfa.56.1669625478439; Mon, 28 Nov 2022 00:51:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669625478; cv=none; d=google.com; s=arc-20160816; b=vLm9juilYBiUY/je9jDftCUtcQYCTwU/YfCb8EN2kf2BWmTa7Sqtzyqh18/6J3NOeW yt/La+TYNC//5NLSR7rotvqt43545hZ3nI/AskuiGe5VxBRRmHpRfJpfCC+umWpiUwFu EOPod2OIqaL7Ktb66l38kiP8Ew68YtGMLWVU0GBL0BzaCP2XiyL0CQ3Tl8frufbtxbwS 2b8+qYj0HkWGVtkaH07ZDr7+r36i71gOb2n/i5GToHV0PTEIJABB9JHwyJwbBYJcRKJ+ o8icEl6Gb/JXUFJ+BRmrvp0rAeTebzGtszR0gEANwsnVtVuG4zigCys0NG53R7eMtQXB DQaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=DQNrsU8IiF8WI8UQ+e/aChGxFx+bAZOLsI3Y9apKOzc=; b=TEo6v2nQBUz8Xx3ien8+My8jyej79vy9fDDRSD0JSR8tQuHLPM2yQp8voKPQmOvku/ w0JZ3HWs/keHifbaIzmlKzQWO/iaqmPnFYIkLWp/4ikXKNMlORAnGcKNhflVMovnfRyS iGnOLRebc6mqF0bNKgS746wJDb00pG7IzHMfTpkpABMKZl2MjF4UrgNgWD/CP9ZcfOX+ uAoDJCO18GRBzwkvwzICVLSwCReHmoi6FJywDAizMbKfoQIbqVYPsqj3/z2DUHkS37Aa uwQ4eFLk42tX5gOOWW2kuXDluwbULWck3qMbvGg7gcSR2hjN4HMqbE0ed9VA7m1AXx7q hk2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fy5+Mq9n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d22-20020a17090ac25600b00218d9c77363si10876496pjx.29.2022.11.28.00.51.05; Mon, 28 Nov 2022 00:51:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fy5+Mq9n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230094AbiK1IuU (ORCPT <rfc822;gah0developer@gmail.com> + 99 others); Mon, 28 Nov 2022 03:50:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229936AbiK1IuT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 28 Nov 2022 03:50:19 -0500 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 346DF13D04; Mon, 28 Nov 2022 00:50:18 -0800 (PST) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2AS8o68r018476; Mon, 28 Nov 2022 02:50:06 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1669625406; bh=DQNrsU8IiF8WI8UQ+e/aChGxFx+bAZOLsI3Y9apKOzc=; h=From:To:CC:Subject:Date; b=fy5+Mq9nsFr6T6OUFkaP/Fi3oBSllu2f2Zzm8ZcCy/k4fKqeVqh+TGXA6in0Z+HK4 Ofm8oLtsIZIn1T29d6zEWb4y03FwAkMUnRaSIj+8HxHG04NH6AVD3r4qUbIGGT2NLL qbw3Ys1qvYCTDU0cZye5nae+lk3lNMxYXSz31p1A= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2AS8o6l8052213 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 28 Nov 2022 02:50:06 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Mon, 28 Nov 2022 02:50:06 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Mon, 28 Nov 2022 02:50:06 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2AS8o5UB016193; Mon, 28 Nov 2022 02:50:06 -0600 From: Jayesh Choudhary <j-choudhary@ti.com> To: <vkoul@kernel.org>, <peter.ujfalusi@gmail.com> CC: <vaishnav.a@ti.com>, <dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <j-choudhary@ti.com> Subject: [PATCH] dmaengine: ti: k3-udma: Do conditional decrement of UDMA_CHAN_RT_PEER_BCNT_REG Date: Mon, 28 Nov 2022 14:20:05 +0530 Message-ID: <20221128085005.489964-1-j-choudhary@ti.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750729205767241819?= X-GMAIL-MSGID: =?utf-8?q?1750729205767241819?= |
Series |
dmaengine: ti: k3-udma: Do conditional decrement of UDMA_CHAN_RT_PEER_BCNT_REG
|
|
Commit Message
Jayesh Choudhary
Nov. 28, 2022, 8:50 a.m. UTC
PSIL_EP_NATIVE endpoints may not have PEER registers for BCNT and thus
udma_decrement_byte_counters() should not try to decrement these counters.
This fixes the issue of crypto IPERF testing where the client side (EVM)
hangs without transfer of packets to the server side, seen since this
function was added.
Fixes: 7c94dcfa8fcf ("dmaengine: ti: k3-udma: Reset UDMA_CHAN_RT byte counters to prevent overflow")
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
---
drivers/dma/ti/k3-udma.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Comments
On 28/11/2022 10:50, Jayesh Choudhary wrote: > PSIL_EP_NATIVE endpoints may not have PEER registers for BCNT and thus > udma_decrement_byte_counters() should not try to decrement these counters. > This fixes the issue of crypto IPERF testing where the client side (EVM) > hangs without transfer of packets to the server side, seen since this > function was added. Right, the BCNT is available on PDMA_XY for sure, I don't know if it is on AASRC/MCAN type tho, but they are not used right now. I might clarify and use ep_type == PSIL_EP_PDMA_XY to be sure that only the known variant is handled, but this is fine as well. Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com> > > Fixes: 7c94dcfa8fcf ("dmaengine: ti: k3-udma: Reset UDMA_CHAN_RT byte counters to prevent overflow") > Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com> > --- > drivers/dma/ti/k3-udma.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c > index ce8b80bb34d7..4c62274e0b33 100644 > --- a/drivers/dma/ti/k3-udma.c > +++ b/drivers/dma/ti/k3-udma.c > @@ -762,11 +762,12 @@ static void udma_decrement_byte_counters(struct udma_chan *uc, u32 val) > if (uc->desc->dir == DMA_DEV_TO_MEM) { > udma_rchanrt_write(uc, UDMA_CHAN_RT_BCNT_REG, val); > udma_rchanrt_write(uc, UDMA_CHAN_RT_SBCNT_REG, val); > - udma_rchanrt_write(uc, UDMA_CHAN_RT_PEER_BCNT_REG, val); > + if (uc->config.ep_type != PSIL_EP_NATIVE) > + udma_rchanrt_write(uc, UDMA_CHAN_RT_PEER_BCNT_REG, val); > } else { > udma_tchanrt_write(uc, UDMA_CHAN_RT_BCNT_REG, val); > udma_tchanrt_write(uc, UDMA_CHAN_RT_SBCNT_REG, val); > - if (!uc->bchan) > + if (!uc->bchan && uc->config.ep_type != PSIL_EP_NATIVE) > udma_tchanrt_write(uc, UDMA_CHAN_RT_PEER_BCNT_REG, val); > } > }
On 28-11-22, 14:20, Jayesh Choudhary wrote: > PSIL_EP_NATIVE endpoints may not have PEER registers for BCNT and thus > udma_decrement_byte_counters() should not try to decrement these counters. > This fixes the issue of crypto IPERF testing where the client side (EVM) > hangs without transfer of packets to the server side, seen since this > function was added. Applied, thanks
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c index ce8b80bb34d7..4c62274e0b33 100644 --- a/drivers/dma/ti/k3-udma.c +++ b/drivers/dma/ti/k3-udma.c @@ -762,11 +762,12 @@ static void udma_decrement_byte_counters(struct udma_chan *uc, u32 val) if (uc->desc->dir == DMA_DEV_TO_MEM) { udma_rchanrt_write(uc, UDMA_CHAN_RT_BCNT_REG, val); udma_rchanrt_write(uc, UDMA_CHAN_RT_SBCNT_REG, val); - udma_rchanrt_write(uc, UDMA_CHAN_RT_PEER_BCNT_REG, val); + if (uc->config.ep_type != PSIL_EP_NATIVE) + udma_rchanrt_write(uc, UDMA_CHAN_RT_PEER_BCNT_REG, val); } else { udma_tchanrt_write(uc, UDMA_CHAN_RT_BCNT_REG, val); udma_tchanrt_write(uc, UDMA_CHAN_RT_SBCNT_REG, val); - if (!uc->bchan) + if (!uc->bchan && uc->config.ep_type != PSIL_EP_NATIVE) udma_tchanrt_write(uc, UDMA_CHAN_RT_PEER_BCNT_REG, val); } }