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: <CAMRc=MfSO_RbrU672WV8MnfRoPJbkJwa4q+7p++6sZf-x3LGOA@mail.gmail.com>
Date: Thu, 29 Feb 2024 18:39:23 +0100
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Arturas Moskvinas <arturas.moskvinas@...il.com>
Cc: andriy.shevchenko@...ux.intel.com, linus.walleij@...aro.org, 
	u.kleine-koenig@...gutronix.de, linux-gpio@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] gpio: 74x164: Enable output pins after registers are reset

On Thu, Feb 29, 2024 at 6:24 PM Arturas Moskvinas
<arturas.moskvinas@...il.com> wrote:
>
>
>
> On 2/29/24 15:25, Bartosz Golaszewski wrote:
>
> On Thu, Feb 29, 2024 at 1:23 PM Arturas Moskvinas
> <arturas.moskvinas@...il.com> wrote:
>
> Chip outputs are enabled[1] before actual reset is performed[2] which might
> cause pin output value to flip flop if previous pin value was set to 1
> in chip.
> Fix that behavior by making sure chip is fully reset before all outputs are
> enabled.
>
> Bartosz, does this look better?
>
> ... if previous pin value was set to 1 period
>
> Andriy, Bartosz, is commit message ok?
> ===
> gpio: 74x164: Enable output pins after registers are reset
>
> Chip outputs are enabled[1] before actual reset is performed[2] which might
> cause pin output value to flip flop if previous pin value was set to 1.
> Fix that behavior by making sure chip is fully reset before all outputs are
> enabled.
>
> Flip-flop can be noticed when module is removed and inserted again and one of
> the pins was changed to 1 before removal. 100 microsecond flipping is
> noticeable on oscilloscope (100khz SPI bus).
>
> For a properly reset chip - output is enabled around 100 microseconds (on 100khz
> SPI bus) later during probing process hence should be irrelevant behavioral
> change.
>
> Fixes: 7ebc194d0fd4 (gpio: 74x164: Introduce 'enable-gpios' property)
> Link: https://elixir.bootlin.com/linux/v6.7.4/source/drivers/gpio/gpio-74x164.c#L130 [1]
> Link: https://elixir.bootlin.com/linux/v6.7.4/source/drivers/gpio/gpio-74x164.c#L150 [2]
> Signed-off-by: Arturas Moskvinas <arturas.moskvinas@...il.com>
> ===
>
> Arturas Moskvinas

Looks good to me.

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ