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: <20250206063600.321650-1-Jerry_C_Chen@wiwynn.com>
Date: Thu,  6 Feb 2025 14:35:59 +0800
From: Jerry C Chen <Jerry_C_Chen@...ynn.com>
To: patrick@...cx.xyz,
	Jean Delvare <jdelvare@...e.com>,
	Guenter Roeck <linux@...ck-us.net>
Cc: Jerry C Chen <Jerry_C_Chen@...ynn.com>,
	linux-hwmon@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH v1 1/1] hwmon: (adc128d818): filter out 0x1ff reading

ASPEED i2c driver doesn't support SMBUS timeout thus we will get dirty
data while SCL hold time over 35ms, filter out default register value
0x1ff to avoid abnormal data reading.

Signed-off-by: Jerry C Chen <Jerry_C_Chen@...ynn.com>
---
 drivers/hwmon/adc128d818.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/adc128d818.c b/drivers/hwmon/adc128d818.c
index 5e805d4ee76a..8197d3f14ea7 100644
--- a/drivers/hwmon/adc128d818.c
+++ b/drivers/hwmon/adc128d818.c
@@ -88,7 +88,7 @@ static struct adc128_data *adc128_update_device(struct device *dev)
                for (i = 0; i < num_inputs[data->mode]; i++) {
                        rv = i2c_smbus_read_word_swapped(client,
                                                         ADC128_REG_IN(i));
-                       if (rv < 0)
+                       if (rv < 0 || rv == 511)
                                goto abort;
                        data->in[0][i] = rv >> 4;

--
2.25.1

WIWYNN PROPRIETARY
This email (and any attachments) contains proprietary or confidential information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or distribution of this email or the content of this email is strictly prohibited. If you are not the intended recipient, please notify the sender and delete this email immediately.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ