netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Parshuram Thombare <pthombar@cadence.com>
Cc: andrew@lunn.ch, nicolas.ferre@microchip.com, davem@davemloft.net,
	netdev@vger.kernel.org, inux-kernel@vger.kernel.org,
	mparab@cadence.com
Subject: Re: [PATCH v4] net: macb: add support for high speed interface
Date: Fri, 23 Oct 2020 17:03:55 +0100	[thread overview]
Message-ID: <20201023160355.GF1551@shell.armlinux.org.uk> (raw)
In-Reply-To: <1603467547-27604-1-git-send-email-pthombar@cadence.com>

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@cadence.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!

  reply	other threads:[~2020-10-23 16:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23 15:39 [PATCH v4] net: macb: add support for high speed interface Parshuram Thombare
2020-10-23 16:03 ` Russell King - ARM Linux admin [this message]
2020-10-24 10:29   ` Parshuram Raju Thombare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201023160355.GF1551@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=inux-kernel@vger.kernel.org \
    --cc=mparab@cadence.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=pthombar@cadence.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).