lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20241016081725.4810-1-tangchunyou@163.com>
Date: Wed, 16 Oct 2024 16:17:25 +0800
From: ChunyouTang <tangchunyou@....com>
To: manivannan.sadhasivam@...aro.org,
	fancer.lancer@...il.com,
	vkoul@...nel.org
Cc: dmaengine@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	tangchunyou@....com
Subject: [PATCH] dma/dw-edma: chip regs base should add the offset

From: tangchunyou <tangchunyou@....com>

1. the regs base in the bar havd en offset rg.off
	.rg.bar		= BAR0,
	.rg.off		= 0x00001000,	/* 4 Kbytes */
	.rg.sz		= 0x00002000,	/* 8 Kbytes */

2. add the rg.off to obtain the real regs base.

Signed-off-by: tangchunyou <tangchunyou@....com>
---
 drivers/dma/dw-edma/dw-edma-pcie.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/dma/dw-edma/dw-edma-pcie.c b/drivers/dma/dw-edma/dw-edma-pcie.c
index 1c6043751dc9..2918b64708f9 100644
--- a/drivers/dma/dw-edma/dw-edma-pcie.c
+++ b/drivers/dma/dw-edma/dw-edma-pcie.c
@@ -234,6 +234,8 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
 	if (!chip->reg_base)
 		return -ENOMEM;
 
+	chip->reg_base += vsec_data.rg.off;
+
 	for (i = 0; i < chip->ll_wr_cnt; i++) {
 		struct dw_edma_region *ll_region = &chip->ll_region_wr[i];
 		struct dw_edma_region *dt_region = &chip->dt_region_wr[i];
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ