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-prev] [day] [month] [year] [list]
Message-ID: <7182147.lOV4Wx5bFT@sven-desktop>
Date: Sat, 02 Aug 2025 16:33:01 +0200
From: Sven Eckelmann <sven@...fation.org>
To: linux-i2c@...r.kernel.org,
 Chris Packham <chris.packham@...iedtelesis.co.nz>,
 Andi Shyti <andi.shyti@...nel.org>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
 Jonas Jelonek <jelonek.jonas@...il.com>
Cc: Markus Stockhausen <markus.stockhausen@....de>,
 Jonas Jelonek <jelonek.jonas@...il.com>
Subject: Re: [PATCH v3 1/3] i2c: rework RTL9300 I2C controller driver

On Sunday, 27 July 2025 13:47:58 CEST Jonas Jelonek wrote:
> Rework the RTL9300 I2C controller driver to use more of the regmap
> API, especially make use of reg_field and regmap_field to represent
> registers instead of macros. Most register operations are performed
> through regmap_field_* API then.
> 
> Handle SCL selection using separate chip-specific functions since this
> is already known to differ between the Realtek SoC families in such a
> way that this cannot be properly handled using just a different
> reg_field.
> 
> These changes make it a lot easier to add support for newer generations
> or to handle differences between specific revisions within a series.
> Support can be added by defining a separate driver data structure with
> the corresponding register field definitions and linking it to a new
> compatible string.
[...]

Thank you for the patchset - used it to get the driver working on an RTL931x 
device.

[...]
>  
>  static int rtl9300_i2c_execute_xfer(struct rtl9300_i2c *i2c, char read_write,
>  				    int size, union i2c_smbus_data *data, int len)
>  {
[...]
> -	ret = regmap_read_poll_timeout(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_CTRL1,
> -				       val, !(val & RTL9300_I2C_MST_CTRL1_I2C_TRIG), 100, 2000);
> +	regmap_field_read_poll_timeout(i2c->fields[F_I2C_TRIG], val, !val, 100, 2000);
>  	if (ret)
>  		return ret;

The "ret =" was lost here. As result, I get "corrupted" data after a timeout 
instead of the expected error.

Kind regards,
	Sven
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ