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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250613060032.14927-1-akhilrajeev@nvidia.com>
Date: Fri, 13 Jun 2025 11:30:32 +0530
From: Akhil R <akhilrajeev@...dia.com>
To: <andy.shevchenko@...il.com>
CC: <akhilrajeev@...dia.com>, <andi.shyti@...nel.org>,
	<andriy.shevchenko@...ux.intel.com>, <conor+dt@...nel.org>,
	<devicetree@...r.kernel.org>, <digetx@...il.com>, <jonathanh@...dia.com>,
	<krzk+dt@...nel.org>, <ldewangan@...dia.com>, <linux-i2c@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <linux-tegra@...r.kernel.org>,
	<p.zabel@...gutronix.de>, <robh@...nel.org>, <thierry.reding@...il.com>
Subject: Re: [PATCH v4 2/3] i2c: tegra: make reset an optional property

On Thu, 12 Jun 2025 21:43:56 +0300, Andy Shevchenko wrote:

>> >> >     if (handle)
>> >> >             err = acpi_evaluate_object(handle, "_RST", NULL, NULL);
>> >> > -   else
>> >> > +   else if (i2c_dev->rst)
>> >> >             err = reset_control_reset(i2c_dev->rst);
>> >> > +   else
>> >> > +           err = tegra_i2c_master_reset(i2c_dev);
>> >>
>> >> Can you please take a look here? Should the reset happen in ACPI?
>> >
>> > This is a good question. Without seeing all the implementations of _RST method
>> > for the platforms based on this SoC it's hard to say. Ideally the _RST (which
>> > is called above) must handle it properly, but firmwares have bugs...
>> >
>> > TL;DR: I think the approach is correct, and if any bug in ACPI will be found,
>> > the workaround (quirk) needs to be added here later on.
>> 
>> As in Thierry's comment, I was in thought of updating the code as below.
>> Does it make sense or would it be better keep what it is there now?
>> 
>> if (handle && acpi_has_method(handle, "_RST"))
>> 	err = acpi_evaluate_object(handle, "_RST", NULL, NULL);
>> else if (i2c_dev->rst)
>> 	err = reset_control_reset(i2c_dev->rst);
>> else
>> 	err = tegra_i2c_master_reset(i2c_dev);
>
> This will change current behaviour for the ACPI based platforms that do not
> have an _RST method. At bare minumum this has to be elaborated in the commit
> message with an explanation why it's not a probnlem.
>

This sequence is hit only at boot and on any error. It should be good to reset
the controller internally at least for those cases. We are reconfiguring the I2C
anyway after this and hence should not cause any problem.
Will add these in the commit message as well.

Thanks & Regards,
Akhil


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ