Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1227457iol; Fri, 10 Jun 2022 03:05:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyL3hwVTFckJhXsAfEK8tdiwo5L0U1CbkALSwApcybJyocxo4+/DEKWIrlIuO/UkxUeYWSJ X-Received: by 2002:a05:6402:195:b0:431:5499:35eb with SMTP id r21-20020a056402019500b00431549935ebmr31393800edv.346.1654855544836; Fri, 10 Jun 2022 03:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654855544; cv=none; d=google.com; s=arc-20160816; b=QHYZkM1fieM+vIpgWan0egexVoV2f4Ll0BSdhD49s5Y2PC3UBYaWGGodjrmjy46Zo4 9nZ3c8JZveXORd08doJRLZjGJQpRYR4r02bpgOS2RrmCIrl4TQ/ieohz7sIm4G6J0hJz vZmVICa64v2Tzoh884GDZB0EtgyF73OXfqGqtLGiBfCdAfYSR0ehc4EFQKIj1Zw3nJWA MZFMlghFkLdj2au7Xsiu52TyX6Zm9gSKz+cqJiRtb3i9b7LVgRYGSNXIm2/c9wyKAplK Ha+l1GzvBRbnI+KCqYew2sO0SG5ef90j9o2MO348ai7tGX5qSCYODp75yPpXH6EIRb5W UlKg== 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:dkim-filter; bh=Q7PDWIThwZRkek/gGiXnjvmq6wwSx3rZpBEkbZ6TBEs=; b=tlsZBS1CcbJaDytagoqPbrdRg6K4mBpWWY1wmF6xdROXXjCOMYQFPR60Zt8cpGkPLP kFmZFVnLaU/Wt/kqy+bZzLE6KumvOCV+G1ssKwLcCixeSEjijEJ0gHmY1rjV5ORusrxM DVlqqe5I2DzIalV6FsOQJgjWR3k79Yn7awuv4H/KVOq5wUpZUfi/tBA+gQLyXHeACtcU hinQ0nKl+QlYE1/bZob1zNbFHXppxHv6UJj1vXOl+3yLH4H3J+1k6xcylc88ckA40tCF j+sR0im4sg7kUCWxYFh1kObt7W3ti53vg+rHc9XOO2arWVn+9PPkRnbKqFZHfueGqB+M 4aUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baikalelectronics.ru header.s=mail header.b=UW8pmCyQ; 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 q10-20020a056402032a00b0042b635aefcfsi20181158edw.82.2022.06.10.03.05.18; Fri, 10 Jun 2022 03:05:44 -0700 (PDT) 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=mail header.b=UW8pmCyQ; 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 S1343530AbiFJJQ6 (ORCPT + 99 others); Fri, 10 Jun 2022 05:16:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348683AbiFJJPR (ORCPT ); Fri, 10 Jun 2022 05:15:17 -0400 Received: from mail.baikalelectronics.com (mail.baikalelectronics.com [87.245.175.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 38D0A1BD8CE; Fri, 10 Jun 2022 02:15:14 -0700 (PDT) Received: from mail (mail.baikal.int [192.168.51.25]) by mail.baikalelectronics.com (Postfix) with ESMTP id 66CCA16A5; Fri, 10 Jun 2022 12:15:59 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.baikalelectronics.com 66CCA16A5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baikalelectronics.ru; s=mail; t=1654852559; bh=Q7PDWIThwZRkek/gGiXnjvmq6wwSx3rZpBEkbZ6TBEs=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=UW8pmCyQl+N7Dn7SkrN9mJjy3SzcQsWTZcOP4USaI0w1hlidysaQR/jrRmeW6oVRJ 57d1Z/StxANbPxMd4gE+ZWNA/qM5MnvwHewXKyxGgiZWlBiJAGpOfn5rf370kWE2Yu yn2oQUh2wLENNeoljbEie1IlWc9Hw7GXIxrBSqpk= Received: from localhost (192.168.53.207) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 10 Jun 2022 12:15:07 +0300 From: Serge Semin To: Gustavo Pimentel , Vinod Koul , Rob Herring , Bjorn Helgaas , Lorenzo Pieralisi , Jingoo Han , Frank Li , Manivannan Sadhasivam CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , , , , Gustavo Pimentel Subject: [PATCH v3 04/24] dmaengine: dw-edma: Fix missing src/dst address of the interleaved xfers Date: Fri, 10 Jun 2022 12:14:39 +0300 Message-ID: <20220610091459.17612-5-Sergey.Semin@baikalelectronics.ru> In-Reply-To: <20220610091459.17612-1-Sergey.Semin@baikalelectronics.ru> References: <20220610091459.17612-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 --- 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 04efcb16d13d..f0ef87d75ea9 100644 --- a/drivers/dma/dw-edma/dw-edma-core.c +++ b/drivers/dma/dw-edma/dw-edma-core.c @@ -456,6 +456,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; @@ -471,6 +473,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.35.1