Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Ansuel Smith <ansuelsmth@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Jonathan McDowell <noodles@earth.li>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [net PATCH 1/2] net: dsa: qca8k: fix internal delay applied to the wrong PAD config
Date: Sun, 21 Nov 2021 20:18:29 +0200	[thread overview]
Message-ID: <20211121181829.qymovkzzhxj2fn3v@skbuf> (raw)
In-Reply-To: <20211119020350.32324-1-ansuelsmth@gmail.com>

On Fri, Nov 19, 2021 at 03:03:49AM +0100, Ansuel Smith wrote:
> With SGMII phy the internal delay is always applied to the PAD0 config.
> This is caused by the falling edge configuration that hardcode the reg
> to PAD0 (as the falling edge bits are present only in PAD0 reg)
> Move the delay configuration before the reg overwrite to correctly apply
> the delay.
> 
> Fixes: cef08115846e ("net: dsa: qca8k: set internal delay also for sgmii")
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> ---

This removes the need for your other patch "net: dsa: qca8k: skip sgmii
delay on double cpu conf", right?

>  drivers/net/dsa/qca8k.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
> index a429c9750add..d7bcecbc1c53 100644
> --- a/drivers/net/dsa/qca8k.c
> +++ b/drivers/net/dsa/qca8k.c
> @@ -1433,6 +1433,12 @@ qca8k_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
>  
>  		qca8k_write(priv, QCA8K_REG_SGMII_CTRL, val);
>  
> +		/* From original code is reported port instability as SGMII also
> +		 * require delay set. Apply advised values here or take them from DT.
> +		 */
> +		if (state->interface == PHY_INTERFACE_MODE_SGMII)
> +			qca8k_mac_config_setup_internal_delay(priv, cpu_port_index, reg);
> +
>  		/* For qca8327/qca8328/qca8334/qca8338 sgmii is unique and
>  		 * falling edge is set writing in the PORT0 PAD reg
>  		 */
> @@ -1455,12 +1461,6 @@ qca8k_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
>  					QCA8K_PORT0_PAD_SGMII_TXCLK_FALLING_EDGE,
>  					val);
>  
> -		/* From original code is reported port instability as SGMII also
> -		 * require delay set. Apply advised values here or take them from DT.
> -		 */
> -		if (state->interface == PHY_INTERFACE_MODE_SGMII)
> -			qca8k_mac_config_setup_internal_delay(priv, cpu_port_index, reg);
> -
>  		break;
>  	default:
>  		dev_err(ds->dev, "xMII mode %s not supported for port %d\n",
> -- 
> 2.32.0
> 

  parent reply	other threads:[~2021-11-21 18:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19  2:03 [net PATCH 1/2] net: dsa: qca8k: fix internal delay applied to the wrong PAD config Ansuel Smith
2021-11-19  2:03 ` [net PATCH 2/2] net: dsa: qca8k: fix MTU calculation Ansuel Smith
2021-11-21 18:14   ` Vladimir Oltean
2021-11-21 18:18 ` Vladimir Oltean [this message]
2021-11-21 18:22   ` [net PATCH 1/2] net: dsa: qca8k: fix internal delay applied to the wrong PAD config Ansuel Smith
2021-11-21 18:36 ` Vladimir Oltean
2021-11-22 12:50 ` patchwork-bot+netdevbpf

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=20211121181829.qymovkzzhxj2fn3v@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=noodles@earth.li \
    --cc=vivien.didelot@gmail.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