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]
Date:   Mon, 23 Jan 2023 15:49:11 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Jerome Brunet <jbrunet@...libre.com>
Cc:     netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        linux-amlogic@...ts.infradead.org,
        Kevin Hilman <khilman@...libre.com>,
        Neil Armstrong <narmstrong@...libre.com>,
        linux-kernel@...r.kernel.org,
        Heiner Kallweit <hkallweit1@...il.com>,
        Qi Duan <qi.duan@...ogic.com>
Subject: Re: [PATCH net] net: mdio-mux-meson-g12a: force internal PHY off on
 mux switch

On Mon, Jan 23, 2023 at 02:50:37PM +0100, Jerome Brunet wrote:
> Force the internal PHY off then on when switching to the internal path.
> This fixes problems where the PHY ID is not properly set.
> 
> Fixes: 7090425104db ("net: phy: add amlogic g12a mdio mux support")
> Suggested-by: Qi Duan <qi.duan@...ogic.com>
> Co-developed-by: Heiner Kallweit <hkallweit1@...il.com>
> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
> Signed-off-by: Jerome Brunet <jbrunet@...libre.com>
> ---
> 
> The initial discussion about this change can be found here:
> https://lore.kernel.org/all/1j4jslwen5.fsf@starbuckisacylon.baylibre.com/
> 
>  drivers/net/mdio/mdio-mux-meson-g12a.c | 23 ++++++++++++++++-------
>  1 file changed, 16 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/mdio/mdio-mux-meson-g12a.c b/drivers/net/mdio/mdio-mux-meson-g12a.c
> index 4a2e94faf57e..da61f00a6666 100644
> --- a/drivers/net/mdio/mdio-mux-meson-g12a.c
> +++ b/drivers/net/mdio/mdio-mux-meson-g12a.c
> @@ -4,6 +4,7 @@
>   */
>  
>  #include <linux/bitfield.h>
> +#include <linux/delay.h>
>  #include <linux/clk.h>
>  #include <linux/clk-provider.h>
>  #include <linux/device.h>
> @@ -151,6 +152,7 @@ static const struct clk_ops g12a_ephy_pll_ops = {
>  static int g12a_enable_internal_mdio(struct g12a_mdio_mux *priv)
>  {
>  	int ret;
> +	u32 value;

Reverse Christmas tree please. Longest first, shortest last.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ