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: <20191004140429.GB24154@lunn.ch>
Date:   Fri, 4 Oct 2019 16:04:29 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Andrea Merello <andrea.merello@...il.com>
Cc:     f.fainelli@...il.com, hkallweit1@...il.com, davem@...emloft.net,
        netdev@...r.kernel.org
Subject: Re: [PATCH] net: phy: allow for reset line to be tied to a sleepy
 GPIO controller

On Fri, Oct 04, 2019 at 03:53:32PM +0200, Andrea Merello wrote:
> mdio_device_reset() makes use of the atomic-pretending API flavor for
> handling the PHY reset GPIO line.
> 
> I found no hint that mdio_device_reset() is called from atomic context
> and indeed it uses usleep_range() since long time, so I would assume that
> it is OK to sleep there.
> 
> This patch switch to gpiod_set_value_cansleep() in mdio_device_reset().
> This is relevant if e.g. the PHY reset line is tied to a I2C GPIO
> controller.
> 
> This has been tested on a ZynqMP board running an upstream 4.19 kernel and
> then hand-ported on current kernel tree.
> 
> Signed-off-by: Andrea Merello <andrea.merello@...il.com>

Yes, all the other bits of code using GPIOs are using the _cansleep
versions.

Reviewed-by: Andrew Lunn <andrew@...n.ch>

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ