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: <CZFWIJE9978P.G3TZC2YIUST9@bootlin.com>
Date: Tue, 27 Feb 2024 14:38:39 +0100
From: Théo Lebrun <theo.lebrun@...tlin.com>
To: "Wolfram Sang" <wsa@...nel.org>
Cc: "Linus Walleij" <linus.walleij@...aro.org>, "Andi Shyti"
 <andi.shyti@...nel.org>, "Rob Herring" <robh+dt@...nel.org>, "Krzysztof
 Kozlowski" <krzysztof.kozlowski+dt@...aro.org>, "Conor Dooley"
 <conor+dt@...nel.org>, "Thomas Bogendoerfer" <tsbogend@...ha.franken.de>,
 <linux-arm-kernel@...ts.infradead.org>, <linux-i2c@...r.kernel.org>,
 <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
 <linux-mips@...r.kernel.org>, "Gregory Clement"
 <gregory.clement@...tlin.com>, "Vladimir Kondratiev"
 <vladimir.kondratiev@...ileye.com>, "Thomas Petazzoni"
 <thomas.petazzoni@...tlin.com>, "Tawfik Bayouk"
 <tawfik.bayouk@...ileye.com>
Subject: Re: [PATCH 09/13] i2c: nomadik: fetch timeout-usecs property from
 devicetree

Hello,

On Tue Feb 27, 2024 at 1:14 PM CET, Wolfram Sang wrote:
> > +	/* Slave response timeout */
> > +	if (!of_property_read_u32(np, "timeout-usecs", &timeout_usecs))
> > +		priv->timeout_usecs = timeout_usecs;
> > +	else
> > +		priv->timeout_usecs = 200 * USEC_PER_MSEC;
>
> I could imagine to add 'transfer_timeout_us' to struct i2c_timings.
> Then, you could use 'i2c_parse_fw_timings' to obtain the value. What
> values/value range do you use here? I can't find them in the DTS
> additions.

That sounds good. I have not used this prop in the DTS as it does not
make much sense for an eval board. The target is production boards.

An order of magnitude is a few transfers every 15ms. It means a timeout
of 15ms divided by "a few". I don't have more precise values, but I
could if you consider it useful.

I've done some testing at 50~100µs timeouts and it works as expected. At
those values timerslack is important to consider (default of 50µs).
This is at 400kHz clock frequency. Keep in mind the controllers support
up to 3.4MHz (not yet upstreamed) so timeouts could in theory go
lower if required by the usecase.

My upcoming question is how to move forward on this series. I can do the
patch to i2c_parse_fw_timings() in the next revision. That way it gets
added alongside the first user of this feature. Would it work for you?

Thanks,

--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ