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] [thread-next>] [day] [month] [year] [list]
Message-ID: <aG_FvfN6xXuULolK@smile.fi.intel.com>
Date: Thu, 10 Jul 2025 16:53:01 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Akhil R <akhilrajeev@...dia.com>
Cc: andi.shyti@...nel.org, digetx@...il.com, jonathanh@...dia.com,
	ldewangan@...dia.com, linux-i2c@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org,
	p.zabel@...gutronix.de, thierry.reding@...il.com,
	conor+dt@...nel.org, devicetree@...r.kernel.org, krzk+dt@...nel.org,
	robh@...nel.org
Subject: Re: [PATCH v6 2/3] i2c: tegra: Use internal reset when reset
 property is not available

On Thu, Jul 10, 2025 at 06:42:05PM +0530, Akhil R wrote:
> For controllers that has an internal software reset, make the reset
> property optional. This provides and option to use I2C in systems
> that choose to restrict reset control from Linux or not to implement
> the ACPI _RST method.
> 
> Internal reset was not required when the reset control was mandatory.
> But on platforms where the resets are outside the control of Linux,
> this had to be implemented by just returning success from BPMP or with
> an empty _RST method in the ACPI table, basically ignoring the reset.
> 
> While the internal reset is not identical to the hard reset of the
> controller, this will reset all the internal state of the controller
> including FIFOs. This may slightly alter the behaviour in systems
> which were ignoring the reset but it should not cause any functional
> difference since all the required I2C registers are configured after
> this reset, just as in boot. Considering that this sequence is hit
> during the boot or during the I2C recovery path from an error, the
> internal reset provides a better alternative than just ignoring the
> reset.

...

I would perhaps expand the comment here to explain ENOENT check and what do we
do in this case. (Note, no rewriting of the existing, just adding a paragraph)

	*
	* In case ... we compare with -ENOENT ...
	* ...
	*/

>  	err = device_reset(i2c_dev->dev);
> +	if (err == -ENOENT)
> +		err = tegra_i2c_master_reset(i2c_dev);

>  	WARN_ON_ONCE(err);

Other that that, LGTM,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ