netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Arseny Solokha <asolokha@kb.kras.ru>
Cc: Claudiu Manoil <claudiu.manoil@nxp.com>,
	Ioana Ciornei <ioana.ciornei@nxp.com>,
	Andrew Lunn <andrew@lunn.ch>,
	netdev@vger.kernel.org
Subject: Re: [RFC PATCH 1/2] gianfar: convert to phylink
Date: Wed, 24 Jul 2019 09:19:15 +0100	[thread overview]
Message-ID: <20190724081915.GF1330@shell.armlinux.org.uk> (raw)
In-Reply-To: <20190723151702.14430-2-asolokha@kb.kras.ru>

On Tue, Jul 23, 2019 at 10:17:01PM +0700, Arseny Solokha wrote:
> -static noinline void gfar_update_link_state(struct gfar_private *priv)
> +static void gfar_mac_config(struct phylink_config *config, unsigned int mode,
> +			    const struct phylink_link_state *state)
>  {
> +	struct gfar_private *priv = netdev_priv(to_net_dev(config->dev));
>  	struct gfar __iomem *regs = priv->gfargrp[0].regs;
> -	struct net_device *ndev = priv->ndev;
> -	struct phy_device *phydev = ndev->phydev;
> -	struct gfar_priv_rx_q *rx_queue = NULL;
> -	int i;
> +	u32 maccfg1, new_maccfg1;
> +	u32 maccfg2, new_maccfg2;
> +	u32 ecntrl, new_ecntrl;
> +	u32 tx_flow, new_tx_flow;
>  
>  	if (unlikely(test_bit(GFAR_RESETTING, &priv->state)))
>  		return;
>  
> -	if (phydev->link) {
> -		u32 tempval1 = gfar_read(&regs->maccfg1);
> -		u32 tempval = gfar_read(&regs->maccfg2);
> -		u32 ecntrl = gfar_read(&regs->ecntrl);
> -		u32 tx_flow_oldval = (tempval1 & MACCFG1_TX_FLOW);
> +	if (unlikely(phylink_autoneg_inband(mode)))
> +		return;

Given that SFPs can be either SGMII or 1000BASE-X (which require
different configuration) and that the intention here is to support
SFPs, I don't see how this works with the above.

How is the difference between SGMII and 1000BASE-X handled?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

  parent reply	other threads:[~2019-07-24  8:19 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 15:17 [RFC PATCH 0/2] convert gianfar to phylink Arseny Solokha
2019-07-23 15:17 ` [RFC PATCH 1/2] gianfar: convert " Arseny Solokha
2019-07-23 16:07   ` Claudiu Manoil
2019-07-24  7:36     ` Arseny Solokha
2019-07-24  8:19   ` Russell King - ARM Linux admin [this message]
2019-07-29 23:39   ` Vladimir Oltean
2019-07-30 10:23     ` Russell King - ARM Linux admin
2019-08-24 12:49       ` Vladimir Oltean
2019-07-30 14:40     ` Arseny Solokha
2019-08-24 15:21       ` Vladimir Oltean
2019-08-28 15:20         ` Vladimir Oltean
2019-09-04 13:52         ` [PATCH 0/4] gianfar: some assorted cleanup Arseny Solokha
2019-09-04 13:52           ` [PATCH 1/4] gianfar: remove forward declarations Arseny Solokha
2019-09-04 13:52           ` [PATCH 2/4] gianfar: make five functions static Arseny Solokha
2019-09-04 13:52           ` [PATCH 3/4] gianfar: cleanup gianfar.h Arseny Solokha
2019-09-04 13:52           ` [PATCH 4/4] gianfar: use DT more consistently when selecting PHY connection type Arseny Solokha
2019-09-05 10:28           ` [PATCH 0/4] gianfar: some assorted cleanup David Miller
2019-09-05 10:39           ` Vladimir Oltean
2019-09-04 13:54         ` [RFC PATCH 1/2] gianfar: convert to phylink Arseny Solokha
2019-09-04 13:53     ` Arseny Solokha
2019-07-23 15:17 ` [RFC PATCH 2/2] net: phylink: don't start and stop SGMII PHYs in SFP modules twice Arseny Solokha
2019-07-24  9:01   ` Russell King - ARM Linux admin
2019-07-24 13:31     ` [PATCH v2] " Arseny Solokha
2019-07-24 13:36       ` Andrew Lunn
2019-07-24 13:37       ` Russell King - ARM Linux admin
2019-07-24 21:38       ` David Miller

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=20190724081915.GF1330@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=asolokha@kb.kras.ru \
    --cc=claudiu.manoil@nxp.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=netdev@vger.kernel.org \
    /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).