From patchwork Tue Dec 12 11:10:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddharth Vadapalli X-Patchwork-Id: 13488971 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DC06FC4332F for ; Tue, 12 Dec 2023 11:11:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fH40vDqZ5jqxZn/ndtblOUIcI96hwvv3V6A6o7B+2u8=; b=kwf8GWRdmRUAV1 +e8jUfc+i2cvNwdH3rpizmKwe9o5jHziqaXuU6aen/WpH9ilUvy5E4AzF60XCMZ21K0ihXgVJwGC1 MYcqgP0H0GGdaqeAfbjvV8X3ynUpWlyDlzCWHgxImTEsgBZAL+8tu6E3FjDH78cuCqReIvtDhZZys Kjxy13zN++wf3m8TjsYwbcMB2XuA8Q40DsgT0xogJybXAvP9oQltpgufW5eceF2ZKrFX/gCenw3S2 Y84JD75U3jXHgFwLdiv60XDiePRp85fzXgXSAaq6HculS7oAzOtpnWCqvK8cLqAg8Ur5yAhvZ6aEv 0DR5CQHEQFOzM6cfH3/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rD0fO-00BNn1-1R; Tue, 12 Dec 2023 11:11:10 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rD0fL-00BNja-0z for linux-arm-kernel@bombadil.infradead.org; Tue, 12 Dec 2023 11:11:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:Content-Transfer-Encoding :MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From: Sender:Reply-To:Content-ID:Content-Description; bh=rJFXrrgFOd1lUZkhXA6Tx5Vqg9CUHLXSKpgDsjyKI+I=; b=j9dcI3BBvFxXLS9qnB0otlLMnm m1idLJKytQ6mVY/w4WDPplG6c/0LB/LuG7I+eJNA0B4L1jgMozy3PImYsmcp3GQrcAezSffL0ZSTO pjCOWr+T/5PJ7A8VV9y0VnGSKq9uyjTEcOFxWrvmy8NxSJct8nCYmiMuv8sPm+xRK1J/rE+DZ0cM0 mPfMOj80orgzUzwSQBdTnL+HGOn28EdvhlWKmszEsZYONRFNCDR+shlIqaCUk/xT9jRKML9SUJfiU cVUMELYOBsM08RhBh511ijDF7AhkeQEPbi7+Ym3cw0pyeXwo5UsvdkD57tSBJNTwvjoOGTs+0vkAi Ta0yc5fQ==; Received: from fllv0015.ext.ti.com ([198.47.19.141]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rD0f6-008VZt-0e for linux-arm-kernel@lists.infradead.org; Tue, 12 Dec 2023 11:11:05 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3BCBAJ9U052432; Tue, 12 Dec 2023 05:10:19 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1702379419; bh=rJFXrrgFOd1lUZkhXA6Tx5Vqg9CUHLXSKpgDsjyKI+I=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=AQWNiUrejD8z82OePDbeJG/Htv3WIYLSvoUiidk8Hj46obJ5wqP5PM21s6kUuMld9 U4Y6AHz+lmq35qwhS1vn/xtZSwG0GJDZAn8LCRgLwh792rm6m2hfKCAxhOZ8IkvGRD uSfBtnetaQ7JO8akYtj/OkDuxmcHlfVqptzf0O4A= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3BCBAJqn021165 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 12 Dec 2023 05:10:19 -0600 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 12 Dec 2023 05:10:19 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 12 Dec 2023 05:10:19 -0600 Received: from uda0492258.dhcp.ti.com (uda0492258.dhcp.ti.com [172.24.227.9]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3BCBAB9x088764; Tue, 12 Dec 2023 05:10:17 -0600 From: Siddharth Vadapalli To: , CC: , , , , , Subject: [PATCH v2 2/4] dmaengine: ti: k3-udma-glue: Update name for remote RX channel device Date: Tue, 12 Dec 2023 16:40:09 +0530 Message-ID: <20231212111011.1401641-3-s-vadapalli@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231212111011.1401641-1-s-vadapalli@ti.com> References: <20231212111011.1401641-1-s-vadapalli@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231212_111057_185431_8476B367 X-CRM114-Status: GOOD ( 12.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org A single RX Channel can have multiple flows. It is possible that a single device requests multiple flows on the same RX Channel. In such cases, the existing implementation of naming the device on the basis of the RX Channel can result in duplicate names. The existing implementation only uses the RX Channel source thread when naming, which implies duplicate names when different flows are being requested on the same RX Channel. In order to avoid duplicate names, include the RX flow as well in the name. Signed-off-by: Siddharth Vadapalli --- drivers/dma/ti/k3-udma-glue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/ti/k3-udma-glue.c b/drivers/dma/ti/k3-udma-glue.c index d8781625034b..eff1ae3d3efe 100644 --- a/drivers/dma/ti/k3-udma-glue.c +++ b/drivers/dma/ti/k3-udma-glue.c @@ -1072,8 +1072,8 @@ k3_udma_glue_request_remote_rx_chn(struct device *dev, const char *name, rx_chn->common.chan_dev.class = &k3_udma_glue_devclass; rx_chn->common.chan_dev.parent = xudma_get_device(rx_chn->common.udmax); - dev_set_name(&rx_chn->common.chan_dev, "rchan_remote-0x%04x", - rx_chn->common.src_thread); + dev_set_name(&rx_chn->common.chan_dev, "rchan_remote-0x%04x-0x%02x", + rx_chn->common.src_thread, rx_chn->flow_id_base); ret = device_register(&rx_chn->common.chan_dev); if (ret) { dev_err(dev, "Channel Device registration failed %d\n", ret);