Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1255683rwb; Fri, 13 Jan 2023 09:46:05 -0800 (PST) X-Google-Smtp-Source: AMrXdXtZu8mR6WcuT8EscwC/7htWzL8xT0mspWPd9nZfOul77APYXvgXvAeIjVFOMWnHpf9gySbo X-Received: by 2002:a05:6a20:a011:b0:b5:c7ed:3de1 with SMTP id p17-20020a056a20a01100b000b5c7ed3de1mr26013102pzj.0.1673631965449; Fri, 13 Jan 2023 09:46:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673631965; cv=none; d=google.com; s=arc-20160816; b=1HEam5r/763VM4VCzRD+Lb1rog2WDjDUFbZYelRixLeSE+WdkXg0AnnKl9P0Pjhr2D iuPX2OpUWT6pODoCNa/PNHClRX+4qfS1X2mufaelDQ+9UA0EZ/78t7Kio3nj/fCEdEcL 7ilLakRJ8zOLIx3k/Ce7KMfiUMUTjKnqkf4xa75EvmkDf5WP8aO9VBRj9M9B2duVJnR4 J0Ukm63kyHo6ACmkF6MDmaHASBbEh9wOf65a3iOdP8oUBr4AXR/ZWeiF0hbgmsncmp96 /aqdMQ0wKzK7enQNP/n35mZ8vSPZAuu3b2cEZk2Q5fMCyIQF4WY96eSrqdi7VrZKc8KS VnOw== 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=Tx45rUBHoY/IsByRXGmLDUzcyD/t/V57Pwb7WAVxkr8=; b=UhMvQnWx4noQ5pRGSXLBrnkEqPr8FoiDC6KkDCNxczYUH9qOHixffNdjwAJ2v5txm/ jBrsJTp1WWVIlQ9VWoMAU3zg2XCevBD26HUpFv9X6a5FeGP1il/FnvvgZBKt5SOZ058p tF5e3kIGUINGXsFLmihDJk8XpGY3qT5gnUPruLm+LQp7CGedP2TeM782wli5yDJKl0nk phyvqd7XKbtxnDr+OYEG8X2PgeKAgyMPzX8k09YoDMfcr5VzCCsdiOQH+RAKuBYzNzVB EfInQAJPwXG4JguH9mNrj7/yMAywfj6HIpgizi4QGodJ2mJQXdeFk3k7SZog3kiEZGSx 4Stg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baikalelectronics.ru header.s=post header.b=FRFEF4hE; 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 b37-20020a631b25000000b004965dbd5c9esi21110587pgb.822.2023.01.13.09.45.59; Fri, 13 Jan 2023 09:46:05 -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=FRFEF4hE; 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 S230362AbjAMRXS (ORCPT + 51 others); Fri, 13 Jan 2023 12:23:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229999AbjAMRWa (ORCPT ); Fri, 13 Jan 2023 12:22:30 -0500 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9F0D2A1800; Fri, 13 Jan 2023 09:14:22 -0800 (PST) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id CA9F3E0F1F; Fri, 13 Jan 2023 20:14:21 +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=Tx45rUBHoY/IsByRXGmLDUzcyD/t/V57Pwb7WAVxkr8=; b=FRFEF4hEpa30 o5WHIa8irBVECooc7iFSTZNe0seOayNevSg5DU1rQKZtaQcjTFJy11BqIS6gRMDQ GzBMXQeOsJttkHSJAIs+vEf9L/FLuZMhWzmHpTvSBjIAJ0a+srPa0Mxc0nZbSJMD LdhjBx+8UH/O2n8YnRcxPjuedMPgARM= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id A7C2DE0F13; Fri, 13 Jan 2023 20:14:21 +0300 (MSK) Received: from localhost (10.8.30.26) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 13 Jan 2023 20:14:21 +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 v9 04/27] dmaengine: dw-edma: Fix missing src/dst address of the interleaved xfers Date: Fri, 13 Jan 2023 20:13:46 +0300 Message-ID: <20230113171409.30470-5-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230113171409.30470-1-Sergey.Semin@baikalelectronics.ru> References: <20230113171409.30470-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.8.30.26] 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.39.0