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: <CACRpkdav-TK5VrJ+qdzw9af-+orPTfHUhUDmaw0VyYW4Kh9c8g@mail.gmail.com>
Date:   Wed, 9 Nov 2022 09:35:23 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>
Cc:     sean.wang@...nel.org, matthias.bgg@...il.com,
        zhiyong.tao@...iatek.com, wenst@...omium.org,
        linux-mediatek@...ts.infradead.org, linux-gpio@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pinctrl: mediatek: common-v2: Fix bias-disable for PULL_PU_PD_RSEL_TYPE

On Fri, Nov 4, 2022 at 11:56 AM AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com> wrote:

> In pinctrl-paris we're calling the .bias_set_combo() callback when we
> are asked to set the pin bias to either pull up/down or pull disable.
>
> On newer platforms, this callback is mtk_pinconf_bias_set_combo(),
> located in pinctrl-mtk-common-v2.c: this will check the "pull type"
> assigned to the requested pin and in case said pin's pull type is
> MTK_PULL_PU_PD_RSEL_TYPE, this function will set RSEL first, PUPD
> last, which is fine.
>
> The issue comes when we're requesting PIN_CONFIG_BIAS_DISABLE, as
> this does *not* require setting RSEL but only PU_PD: in this case,
> the arg is MTK_DISABLE (zero), which is not a supported RSEL, due
> to which function mtk_pinconf_bias_set_rsel() returns a failure;
> because of that, mtk_pinconf_bias_set_pu_pd() is never called,
> hence the pin bias is never set to DISABLE.
>
> To fix this issue, add a check to mtk_pinconf_bias_set_rsel(): if
> we are entering that function with no pullup requested and at the
> same time the arg is MTK_DISABLE, this means that we're trying to
> disable pin bias, hence it's safe to return cleanly without ever
> setting any RSEL register.
> This makes mtk_pinconf_bias_set_combo() happy, going on with setting
> the PU_PD registers, which is the only action to actually take to
> disable bias on a pin/pingroup.
>
> Fixes: fb34a9ae383a ("pinctrl: mediatek: support rsel feature")
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>

Patch applied for fixes.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ