Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp2709764rwj; Mon, 19 Dec 2022 07:59:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXt6Cl58cM1ALmI99DTo/SH0B5wQaFMEJnTDm5nywOXviJiIafTFTMwwx6DVJ3+pbV2DCkuj X-Received: by 2002:a17:902:e549:b0:18f:9282:d8b0 with SMTP id n9-20020a170902e54900b0018f9282d8b0mr12903225plf.53.1671465540391; Mon, 19 Dec 2022 07:59:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671465540; cv=none; d=google.com; s=arc-20160816; b=BEQfX7QSrbiFiO8NPhicvJAEYEC2jN/5NGGOzR70N5FAdkSx1regxuDA54y48mz3Zn XgF9h1cmGhDu2dMJ93x5sjWh5pWPWDqAZtsTLM0NZ0WkGlDKBhQbYXMny/n9Emn9otFQ vuQht8D5QypQAAA+X057qM2Y7sVhoPGTMEAzwinWRzhx9dQLeKHa083XwpUw6INVSvQY xlrGTxCs9l3rw6rH4swcDR/cmskpSpkg1PmjKCzsFzPtX4rScXiuvbg7xE9pFJecFjlj reXx5rZCkzpmoxjuDFAr9TY8h6+y4NBDUnOUrXw+X7fllEdkeuEzBr5mD9npU2pklPZg Cd+A== 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=TCqeOz2FL8uEcpHHjdwrQW967mI61/OYbB3+Ru9K7WQ=; b=nAigxE1B8Fj9NrP4EYWq+4ncQCSXfC4RxpL1z34rX9XKWe8fuWw1sJ8YkumXBG3i7y gKx+XQkqipCuciIJByIimAg6wuO3ZAuzsK9O93JRSvo8V4xkiCNm7HEuNRzWWf3205Ta 4RdZLoQVSi9Jl3tblTbozyoO9Xi6gl6PHihOsDSQ0843z7OQ6qBE8tM8vXKEH0l3jSSM xyZ3fWN3crkTBuZ5drQc1Bu6og2guQovfabgSYvTSmxgZvWT1mPFevbz2sVJOB3XOBRI RIjB0OIucFzdT4GWzNcvcXFItWlPby9tjD6zyc4UyMfnM3EyqYTzCU36W/6NarKM0kR4 3F7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baikalelectronics.ru header.s=post header.b=poV2GDjg; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b8-20020a170902b60800b001733a212ccfsi10403548pls.330.2022.12.19.07.58.51; Mon, 19 Dec 2022 07:59:00 -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=poV2GDjg; 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 S232008AbiLSOr6 (ORCPT + 71 others); Mon, 19 Dec 2022 09:47:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231891AbiLSOrR (ORCPT ); Mon, 19 Dec 2022 09:47:17 -0500 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E8FF99587; Mon, 19 Dec 2022 06:47:04 -0800 (PST) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 272B2E0EB2; Mon, 19 Dec 2022 17:47:04 +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=TCqeOz2FL8uEcpHHjdwrQW967mI61/OYbB3+Ru9K7WQ=; b=poV2GDjgK3yv QcqwnkXgDVoB+Skf1O93yfeYByhETT2XhUZHWn1Ckhncifu6t/G0Mr76+YLu4UgE xtBZZuo55YeQhgqdgqTR0CtFk3whhDej2Co6nz0OAh3gcV0G3SsBKhr4k0ljMV9S OFqVabOoibkKvDvJnGUVLVGJLtxaBt0= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id 1C703E0E70; Mon, 19 Dec 2022 17:47:04 +0300 (MSK) Received: from localhost (10.8.30.14) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 19 Dec 2022 17:47:03 +0300 From: Serge Semin To: Gustavo Pimentel , Vinod Koul , Rob Herring , Bjorn Helgaas , Lorenzo Pieralisi , Cai Huoqing , Robin Murphy , Jingoo Han , Frank Li , Manivannan Sadhasivam CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , caihuoqing , Yoshihiro Shimoda , , , , Gustavo Pimentel Subject: [PATCH v8 04/26] dmaengine: dw-edma: Fix missing src/dst address of the interleaved xfers Date: Mon, 19 Dec 2022 17:46:35 +0300 Message-ID: <20221219144658.26620-5-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221219144658.26620-1-Sergey.Semin@baikalelectronics.ru> References: <20221219144658.26620-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.8.30.14] 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Manivannan Sadhasivam Tested-by: Manivannan Sadhasivam Acked-by: Vinod Koul --- 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; } } -- 2.38.1