[v6,04/24] dmaengine: dw-edma: Fix missing src/dst address of the interleaved xfers
Message ID | 20221107210438.1515-5-Sergey.Semin@baikalelectronics.ru |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2295820wru; Mon, 7 Nov 2022 13:07:04 -0800 (PST) X-Google-Smtp-Source: AMsMyM7DOoDID8w9cwt0Yta1wcbIYV2SHMPmJnM/ZfERqH3ScSyHPbjBe1grS31wQsDIU8w49Ood X-Received: by 2002:a17:90b:84:b0:213:de0c:1253 with SMTP id bb4-20020a17090b008400b00213de0c1253mr45669203pjb.74.1667855224159; Mon, 07 Nov 2022 13:07:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667855224; cv=none; d=google.com; s=arc-20160816; b=ftKvi608aRUTnX9z+OMdL1fQiuVL18bwqCFNo19+fEEkKH1avqUWqOo1vStP5Z1psW ioNnwZc6lXaOB7vKU3A66lkskL9nhAWQyD/mTN0sL1KtpV34cyqyBQPOLuQM1dSZCNxj vZ+RKfwjHAgZov7O65+hLER9toqNzhv9c8Q5K1etNlyfV3UqbcURQ0WTwF+eNoZq/j91 g88KR/9mxRzEia5Azv/k/jwjCNKKoHTskCTO8Ksb3LKk4c1/olYaG+Dsz9rnjtUokAEi RQUoAfpMINVJkD0jE1ZxCLQBrx5H686Edfi/e9tfdhhfUBHtJlAjzTvacCUTuIPJ3UyR yLIg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=z+zg9rksFxCHkPEOVIhqqHp0psN7po4p2piveAKQl+o=; b=JRDJkmBtav114W+G0UmAADyYyHAdsCicksa/DgVxtYe3jvJpAH6k64nmrvUChcl5MP AS+K1XDiTUM9DBYeJ++6H2b2+PrwF5oh/1ZPALBunj56aj1chHnAvTRsOGvTX94o5CwT YY6c4+FFaQLvyWZlnbTg5Rm6nEII8u1xpc1cphDJ9JpKt+6SAbVtcRRucKPtA/eEHZVp kUo719yoC/X7zeGFxWhr+H3/+/J1Ec5RNkac4IgSyC/vZIn5Q4LfXYtu1MC8UWjGWWtL yt22xLGacngme7U41xHdDdmf4P8jpCM6bLizJNGg2ZJB5Cp26lrY3QsxLG9NdpgrEIQh O3uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baikalelectronics.ru header.s=post header.b=uQf+Z8LA; 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=REJECT sp=REJECT dis=NONE) header.from=baikalelectronics.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u14-20020a170903124e00b001871c7b020dsi13079095plh.531.2022.11.07.13.06.50; Mon, 07 Nov 2022 13:07:04 -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=@baikalelectronics.ru header.s=post header.b=uQf+Z8LA; 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=REJECT sp=REJECT dis=NONE) header.from=baikalelectronics.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233222AbiKGVFD (ORCPT <rfc822;hjfbswb@gmail.com> + 99 others); Mon, 7 Nov 2022 16:05:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233060AbiKGVEt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 7 Nov 2022 16:04:49 -0500 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3E20A60D1; Mon, 7 Nov 2022 13:04:48 -0800 (PST) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 58F04E0ECD; Tue, 8 Nov 2022 00:04:47 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=z+zg9rksFxCHkPEOVIhqqHp0psN7po4p2piveAKQl+o=; b=uQf+Z8LAHOKh 8YFGtOkI7Upgth+NKwP/6ckJ4vSi4sOST0BEeDWN+ENAO+6wcN8fS2pj8GyAiNlD sc/OWkr/mC3KpGR2zvpsCIkYGSiTe1+vtF59hkVQuNWqr1YpxJ1w8iaC3s2fgIXX o5XXMaymjXLy5aEJY8yb43qd8bUUTtk= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id 4725DE0E6A; Tue, 8 Nov 2022 00:04:47 +0300 (MSK) Received: from localhost (192.168.168.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 8 Nov 2022 00:04:46 +0300 From: Serge Semin <Sergey.Semin@baikalelectronics.ru> To: Gustavo Pimentel <gustavo.pimentel@synopsys.com>, Vinod Koul <vkoul@kernel.org>, Rob Herring <robh@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Cai Huoqing <cai.huoqing@linux.dev>, Robin Murphy <robin.murphy@arm.com>, Jingoo Han <jingoohan1@gmail.com>, Frank Li <Frank.Li@nxp.com>, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> CC: Serge Semin <Sergey.Semin@baikalelectronics.ru>, Serge Semin <fancer.lancer@gmail.com>, Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>, Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>, =?utf-8?q?Krzys?= =?utf-8?q?ztof_Wilczy=C5=84ski?= <kw@linux.com>, caihuoqing <caihuoqing@baidu.com>, <linux-pci@vger.kernel.org>, <dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Gustavo Pimentel <Gustavo.Pimentel@synopsys.com> Subject: [PATCH v6 04/24] dmaengine: dw-edma: Fix missing src/dst address of the interleaved xfers Date: Tue, 8 Nov 2022 00:04:18 +0300 Message-ID: <20221107210438.1515-5-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221107210438.1515-1-Sergey.Semin@baikalelectronics.ru> References: <20221107210438.1515-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [192.168.168.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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?1748872959542861030?= X-GMAIL-MSGID: =?utf-8?q?1748872959542861030?= |
Series |
dmaengine: dw-edma: Add RP/EP local DMA controllers support
|
|
Commit Message
Serge Semin
Nov. 7, 2022, 9:04 p.m. UTC
The interleaved DMA transfers support was added in the commit 85e7518f42c8 ("dmaengine: dw-edma: Add device_prep_interleave_dma() support"). It seems like the support was broken from the very beginning. Depending on the selected channel either source or destination address are left uninitialized which was obviously wrong. I don't really know how come the original modification was working for the commit author. Anyway let's fix it by initializing the destination address of the eDMA burst descriptors for the DEV_TO_MEM interleaved operations and by initializing the source address of the eDMA burst descriptors for the MEM_TO_DEV interleaved operations. Fixes: 85e7518f42c8 ("dmaengine: dw-edma: Add device_prep_interleave_dma() support") Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Acked-by: Vinod Koul <vkoul@kernel.org> --- drivers/dma/dw-edma/dw-edma-core.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/dma/dw-edma/dw-edma-core.c b/drivers/dma/dw-edma/dw-edma-core.c index a8c1bd9c7ae9..778d91d9fc1b 100644 --- a/drivers/dma/dw-edma/dw-edma-core.c +++ b/drivers/dma/dw-edma/dw-edma-core.c @@ -455,6 +455,8 @@ dw_edma_device_transfer(struct dw_edma_transfer *xfer) * and destination addresses are increased * by the same portion (data length) */ + } else if (xfer->type == EDMA_XFER_INTERLEAVED) { + burst->dar = dst_addr; } } else { burst->dar = dst_addr; @@ -470,6 +472,8 @@ dw_edma_device_transfer(struct dw_edma_transfer *xfer) * and destination addresses are increased * by the same portion (data length) */ + } else if (xfer->type == EDMA_XFER_INTERLEAVED) { + burst->sar = src_addr; } }