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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250522-iio-dac-adi-axi-dac-fix-bus-read-v1-1-26ec358c57bf@baylibre.com>
Date: Thu, 22 May 2025 18:47:31 +0200
From: Angelo Dureghello <adureghello@...libre.com>
To: Nuno Sa <nuno.sa@...log.com>, Lars-Peter Clausen <lars@...afoo.de>, 
 Michael Hennerich <Michael.Hennerich@...log.com>, 
 Jonathan Cameron <jic23@...nel.org>, David Lechner <dlechner@...libre.com>, 
 Andy Shevchenko <andy@...nel.org>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org, 
 Angelo Dureghello <adureghello@...libre.com>
Subject: [PATCH] iio: dac: adi-axi-dac: fix bus free check

From: Angelo Dureghello <adureghello@...libre.com>

This patch is intended to fix [1] that looks not yet accepted in any
upstream branch.

Poll function must check for a value equal to 0 (bus free condition).

[1] https://lore.kernel.org/linux-iio/l6vu54ltxd7pydkzl6xbbq55gedumzbsllfxnljyngwcg4c6zd@w6qxgn2vby75/

Signed-off-by: Angelo Dureghello <adureghello@...libre.com>
---
 drivers/iio/dac/adi-axi-dac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/dac/adi-axi-dac.c b/drivers/iio/dac/adi-axi-dac.c
index b6cfe07701d47440df478f7b9b4c579434b99a25..a0e546dba3680371e00dc4c8973d4f450c18cf2d 100644
--- a/drivers/iio/dac/adi-axi-dac.c
+++ b/drivers/iio/dac/adi-axi-dac.c
@@ -641,7 +641,7 @@ static int axi_dac_wait_bus_free(struct axi_dac_state *st)
 	int ret;
 
 	ret = regmap_read_poll_timeout(st->regmap, AXI_DAC_UI_STATUS_REG, val,
-		FIELD_GET(AXI_DAC_UI_STATUS_IF_BUSY, val) == -1, 10,
+		FIELD_GET(AXI_DAC_UI_STATUS_IF_BUSY, val) == 0, 10,
 		100 * KILO);
 	if (ret == -ETIMEDOUT)
 		dev_err(st->dev, "AXI bus timeout\n");

---
base-commit: 50b8b618e598468e35551003d7e5cc5db14ee113
change-id: 20250522-iio-dac-adi-axi-dac-fix-bus-read-244fbc07313c

Best regards,
-- 
Angelo Dureghello <adureghello@...libre.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ