From patchwork Tue Feb 2 12:40:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Pimentel X-Patchwork-Id: 12061509 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A49DC433E0 for ; Tue, 2 Feb 2021 12:45:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D74F64F4E for ; Tue, 2 Feb 2021 12:45:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232012AbhBBMpB (ORCPT ); Tue, 2 Feb 2021 07:45:01 -0500 Received: from smtprelay-out1.synopsys.com ([149.117.87.133]:56154 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231786AbhBBMmD (ORCPT ); Tue, 2 Feb 2021 07:42:03 -0500 Received: from mailhost.synopsys.com (mdc-mailhost1.synopsys.com [10.225.0.209]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 5126CC00C5; Tue, 2 Feb 2021 12:41:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1612269661; bh=WnHPY+sRUSSJJQq7Jc0VtKP64lY4iaChTFLji7S/MT0=; h=From:To:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=BlGtGUiypuMGYD82Dy64f/V6EfJ6SOE1ypA0EnrqpPMP558q6ImCuWWKzkvHtIHSD InacHOTNSt/26dtWlfK102tDIvWkgMeAm1dC+JPiO+ypnLtYzXisz+dAiXGJX0hcIH vCAWEOWSrIi0JWfwCo1f1Mko4Jaatl9H0IqQvg3TpEQt9iHqJxNzGId/WFQz+9k1Fu 9cgeclW7MFTtitQ8HecmvlfEmZ+pUcfMrkJop61PetzQ7dJ1j+uf6CzyFHc7dicrYl 35SMIQG1mc8LYLPNkhZT5uJI6QycfP3jGZME7ZsCZ2NTFZ+FrTwf4XRSbuFMyP9Nep +YqjYwf+2gkcQ== Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by mailhost.synopsys.com (Postfix) with ESMTP id 21ECEA024B; Tue, 2 Feb 2021 12:41:00 +0000 (UTC) X-SNPS-Relay: synopsys.com From: Gustavo Pimentel To: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, Gustavo Pimentel , Vinod Koul , Dan Williams Subject: [PATCH v2 14/15] dmaengine: dw-edma: Revert fix scatter-gather address calculation Date: Tue, 2 Feb 2021 13:40:28 +0100 Message-Id: <9af4ac8c3833b81325787771476ed4f1ce027979.1612269537.git.gustavo.pimentel@synopsys.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Reverting the applied patch because it caused a regression on ARC700 platform (32 bits). Signed-off-by: Gustavo Pimentel --- drivers/dma/dw-edma/dw-edma-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/dma/dw-edma/dw-edma-core.c b/drivers/dma/dw-edma/dw-edma-core.c index a299eed..c198451 100644 --- a/drivers/dma/dw-edma/dw-edma-core.c +++ b/drivers/dma/dw-edma/dw-edma-core.c @@ -429,7 +429,8 @@ dw_edma_device_transfer(struct dw_edma_transfer *xfer) if (xfer->type == EDMA_XFER_CYCLIC) { burst->dar = xfer->xfer.cyclic.paddr; } else if (xfer->type == EDMA_XFER_SCATTER_GATHER) { - burst->dar = dst_addr; + src_addr += sg_dma_len(sg); + burst->dar = sg_dma_address(sg); /* Unlike the typical assumption by other * drivers/IPs the peripheral memory isn't * a FIFO memory, in this case, it's a @@ -443,7 +444,8 @@ dw_edma_device_transfer(struct dw_edma_transfer *xfer) if (xfer->type == EDMA_XFER_CYCLIC) { burst->sar = xfer->xfer.cyclic.paddr; } else if (xfer->type == EDMA_XFER_SCATTER_GATHER) { - burst->sar = src_addr; + dst_addr += sg_dma_len(sg); + burst->sar = sg_dma_address(sg); /* Unlike the typical assumption by other * drivers/IPs the peripheral memory isn't * a FIFO memory, in this case, it's a @@ -455,8 +457,6 @@ dw_edma_device_transfer(struct dw_edma_transfer *xfer) } if (xfer->type == EDMA_XFER_SCATTER_GATHER) { - src_addr += sg_dma_len(sg); - dst_addr += sg_dma_len(sg); sg = sg_next(sg); } else if (xfer->type == EDMA_XFER_INTERLEAVED && xfer->xfer.il->frame_size > 0) {