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]
Date:   Thu, 22 Mar 2018 16:29:17 +0100
From:   Gregory CLEMENT <gregory.clement@...tlin.com>
To:     Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pinctrl: ocelot: fix gpio direction

Hi Alexandre,
 
 On jeu., mars 22 2018, Alexandre Belloni <alexandre.belloni@...tlin.com> wrote:

> Bits have to be cleared in DEVCPU_GCB:GPIO:GPIO_OE for input and set for
> output. ocelot_gpio_set_direction() got it wrong and this went unnoticed
> when the driver was reworked.
>
> Reported-by: Gregory Clement <gregory.clement@...tlin.com>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@...tlin.com>

Acked-by: Gregory CLEMENT <gregory.clement@...tlin.com>

Thanks,

Gregory

> ---
>  drivers/pinctrl/pinctrl-ocelot.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
> index a9423238471e..b5b3547fdcb2 100644
> --- a/drivers/pinctrl/pinctrl-ocelot.c
> +++ b/drivers/pinctrl/pinctrl-ocelot.c
> @@ -252,7 +252,7 @@ static int ocelot_gpio_set_direction(struct pinctrl_dev *pctldev,
>  	struct ocelot_pinctrl *info = pinctrl_dev_get_drvdata(pctldev);
>  
>  	regmap_update_bits(info->map, OCELOT_GPIO_OE, BIT(pin),
> -			   input ? BIT(pin) : 0);
> +			   input ? 0 : BIT(pin));
>  
>  	return 0;
>  }
> -- 
> 2.16.2
>

-- 
Gregory Clement, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ