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: <20201023160355.GF1551@shell.armlinux.org.uk>
Date:   Fri, 23 Oct 2020 17:03:55 +0100
From:   Russell King - ARM Linux admin <linux@...linux.org.uk>
To:     Parshuram Thombare <pthombar@...ence.com>
Cc:     andrew@...n.ch, nicolas.ferre@...rochip.com, davem@...emloft.net,
        netdev@...r.kernel.org, inux-kernel@...r.kernel.org,
        mparab@...ence.com
Subject: Re: [PATCH v4] net: macb: add support for high speed interface

On Fri, Oct 23, 2020 at 05:39:07PM +0200, Parshuram Thombare wrote:
> This patch adds support for 10GBASE-R interface to the linux driver for
> Cadence's ethernet controller.
> This controller has separate MAC's and PCS'es for low and high speed paths.
> High speed PCS supports 100M, 1G, 2.5G, 5G and 10G through rate adaptation
> implementation. However, since it doesn't support auto negotiation, linux
> driver is modified to support 10GBASE-R instead of USXGMII. 
> 
> Signed-off-by: Parshuram Thombare <pthombar@...ence.com>

Thanks, this mostly looks good - only one comment.

> @@ -588,6 +670,13 @@ static void macb_mac_config(struct phylink_config *config, unsigned int mode,
>  	if (old_ctrl ^ ctrl)
>  		macb_or_gem_writel(bp, NCFGR, ctrl);
>  
> +	if (bp->phy_interface == PHY_INTERFACE_MODE_10GBASER) {
> +		gem_writel(bp, NCFGR, GEM_BIT(PCSSEL) |
> +			   (gem_readl(bp, NCFGR) & ~GEM_BIT(SGMIIEN)));
> +		gem_writel(bp, NCR, gem_readl(bp, NCR) |
> +			   GEM_BIT(ENABLE_HS_MAC));
> +	}

If we configure 10GBASE-R, then you clear the SGMIIEN bit and then
enable the HS MAC. Can we go back to non-10GBASE-R after that? Should
the code reverse those actions here?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ