netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ioana Ciornei <ioana.ciornei@nxp.com>
To: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 2/3] net: dpaa2-mac: add 1000BASE-X support
Date: Wed, 20 Jan 2021 22:23:56 +0000	[thread overview]
Message-ID: <20210120222355.gnbekhsudjjyar4x@skbuf> (raw)
In-Reply-To: <E1l1t35-0005VX-Uj@rmk-PC.armlinux.org.uk>

On Tue, Jan 19, 2021 at 03:36:03PM +0000, Russell King wrote:
> Now that pcs-lynx supports 1000BASE-X, add support for this interface
> mode to dpaa2-mac. pcs-lynx can be switched at runtime between SGMII
> and 1000BASE-X mode, so allow dpaa2-mac to switch between these as
> well.
> 
> This commit prepares the ground work for allowing 1G fiber connections
> to be used with DPAA2 on the SolidRun CEX7 platforms.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>


> ---
>  .../net/ethernet/freescale/dpaa2/dpaa2-mac.c  | 20 ++++++++++++++++---
>  1 file changed, 17 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
> index 69ad869446cf..3ddfb40eb5e4 100644
> --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
> +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
> @@ -79,10 +79,20 @@ static bool dpaa2_mac_phy_mode_mismatch(struct dpaa2_mac *mac,
>  					phy_interface_t interface)
>  {
>  	switch (interface) {
> +	/* We can switch between SGMII and 1000BASE-X at runtime with
> +	 * pcs-lynx
> +	 */
> +	case PHY_INTERFACE_MODE_SGMII:
> +	case PHY_INTERFACE_MODE_1000BASEX:
> +		if (mac->pcs &&
> +		    (mac->if_mode == PHY_INTERFACE_MODE_SGMII ||
> +		     mac->if_mode == PHY_INTERFACE_MODE_1000BASEX))
> +			return false;
> +		return interface != mac->if_mode;
> +
>  	case PHY_INTERFACE_MODE_10GBASER:
>  	case PHY_INTERFACE_MODE_USXGMII:
>  	case PHY_INTERFACE_MODE_QSGMII:
> -	case PHY_INTERFACE_MODE_SGMII:
>  	case PHY_INTERFACE_MODE_RGMII:
>  	case PHY_INTERFACE_MODE_RGMII_ID:
>  	case PHY_INTERFACE_MODE_RGMII_RXID:
> @@ -122,13 +132,17 @@ static void dpaa2_mac_validate(struct phylink_config *config,
>  		fallthrough;
>  	case PHY_INTERFACE_MODE_SGMII:
>  	case PHY_INTERFACE_MODE_QSGMII:
> +	case PHY_INTERFACE_MODE_1000BASEX:
>  	case PHY_INTERFACE_MODE_RGMII:
>  	case PHY_INTERFACE_MODE_RGMII_ID:
>  	case PHY_INTERFACE_MODE_RGMII_RXID:
>  	case PHY_INTERFACE_MODE_RGMII_TXID:
> -		phylink_set(mask, 10baseT_Full);
> -		phylink_set(mask, 100baseT_Full);
> +		phylink_set(mask, 1000baseX_Full);
>  		phylink_set(mask, 1000baseT_Full);
> +		if (state->interface == PHY_INTERFACE_MODE_1000BASEX)
> +			break;
> +		phylink_set(mask, 100baseT_Full);
> +		phylink_set(mask, 10baseT_Full);
>  		break;
>  	default:
>  		goto empty_set;
> -- 
> 2.20.1
> 

  reply	other threads:[~2021-01-21  2:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-19 15:35 [PATCH net-next 0/3] dpaa2: add 1000base-X support Russell King - ARM Linux admin
2021-01-19 15:35 ` [PATCH net-next 1/3] net: pcs: add pcs-lynx 1000BASE-X support Russell King
2021-01-20 22:03   ` Ioana Ciornei
2021-01-19 15:36 ` [PATCH net-next 2/3] net: dpaa2-mac: add " Russell King
2021-01-20 22:23   ` Ioana Ciornei [this message]
2021-01-19 15:36 ` [PATCH net-next 3/3] net: dpaa2-mac: add backplane link mode support Russell King
2021-01-20 22:19   ` Ioana Ciornei
2021-01-20 22:35     ` Russell King - ARM Linux admin
2021-02-04 14:51     ` Russell King - ARM Linux admin
2021-02-04 15:40       ` Ioana Ciornei

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=20210120222355.gnbekhsudjjyar4x@skbuf \
    --to=ioana.ciornei@nxp.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=ruxandra.radulescu@nxp.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).