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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 1 Sep 2022 17:38:07 +0200
From:   Maxime Chevallier <maxime.chevallier@...tlin.com>
To:     Horatiu Vultur <horatiu.vultur@...rochip.com>
Cc:     <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
        <pabeni@...hat.com>, <linux@...linux.org.uk>,
        <UNGLinuxDriver@...rochip.com>
Subject: Re: [PATCH net-next] net: lan966x: Extend lan966x with RGMII
 support

Hello Horatiu,

On Thu, 1 Sep 2022 14:23:46 +0200
Horatiu Vultur <horatiu.vultur@...rochip.com> wrote:

> Extend lan966x with RGMII support. The MAC supports all RGMII_* modes.
> 
> Signed-off-by: Horatiu Vultur <horatiu.vultur@...rochip.com>
> ---
>  drivers/net/ethernet/microchip/lan966x/lan966x_main.c    | 8 ++++++++
>  drivers/net/ethernet/microchip/lan966x/lan966x_phylink.c | 3 +++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c index
> 1d6e3b641b2e..e2d250ed976b 100644 ---
> a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c +++
> b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c @@ -772,6
> +772,14 @@ static int lan966x_probe_port(struct lan966x *lan966x, u32
> p, __set_bit(PHY_INTERFACE_MODE_MII,
>  		  port->phylink_config.supported_interfaces);
> +	__set_bit(PHY_INTERFACE_MODE_RGMII,
> +		  port->phylink_config.supported_interfaces);
> +	__set_bit(PHY_INTERFACE_MODE_RGMII_ID,
> +		  port->phylink_config.supported_interfaces);
> +	__set_bit(PHY_INTERFACE_MODE_RGMII_RXID,
> +		  port->phylink_config.supported_interfaces);
> +	__set_bit(PHY_INTERFACE_MODE_RGMII_TXID,
> +		  port->phylink_config.supported_interfaces);

Instead of defining each individual variant, you can use :

	phy_interface_set_rgmii(port->phylink_config.supported_interfaces);

>  	__set_bit(PHY_INTERFACE_MODE_GMII,
>  		  port->phylink_config.supported_interfaces);
>  	__set_bit(PHY_INTERFACE_MODE_SGMII,
> diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_phylink.c
> b/drivers/net/ethernet/microchip/lan966x/lan966x_phylink.c index
> 38a7e95d69b4..fb6aee509656 100644 ---
> a/drivers/net/ethernet/microchip/lan966x/lan966x_phylink.c +++
> b/drivers/net/ethernet/microchip/lan966x/lan966x_phylink.c @@ -59,6
> +59,9 @@ static void lan966x_phylink_mac_link_up(struct
> phylink_config *config, port_config->pause |= tx_pause ? MLO_PAUSE_TX
> : 0; port_config->pause |= rx_pause ? MLO_PAUSE_RX : 0; 
> +	if (phy_interface_mode_is_rgmii(interface))
> +		phy_set_speed(port->serdes, speed);
> +
>  	lan966x_port_config_up(port);
>  }
>  

Best regards,

Maxime

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ