All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: Guan Wentao <guanwentao@uniontech.com>
Cc: peppe.cavallaro@st.com, alexandre.torgue@foss.st.com,
	joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com,
	netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] net: stmmac: get phydev->interface from mac for mdio phy init
Date: Wed, 8 Feb 2023 14:11:52 +0100	[thread overview]
Message-ID: <Y+OfmMeP3Eto3K7t@corigine.com> (raw)
In-Reply-To: <20230208124025.5828-1-guanwentao@uniontech.com>

On Wed, Feb 08, 2023 at 08:40:25PM +0800, Guan Wentao wrote:
> The phy->interface from mdiobus_get_phy is default from phy_device_create.
> In some phy devices like at803x, use phy->interface to init rgmii delay.
> Use plat->phy_interface to init if know from stmmac_probe_config_dt.
> 
> Fixes: 74371272f97f ("net: stmmac: Convert to phylink and remove phylib logic")
> Signed-off-by: Guan Wentao <guanwentao@uniontech.com>
> ---

This is v2 of this patch, so let me make some comments about that.

* Firstly, unless asked to repost by a reviewer/maintainer,
  it's generally bad practice to post a patch(set) more than once within 24h.

* If it is a networking but fix, then it should be targeted at the 'net' tree.
  Otherwise, networking patches should be targeted at the 'net-next' tree.
  In either case this should be noted in the subject.

  Also, v2 (and so on), should be noted in the subject.

  Something like this:

  [PATCH v2 net-next] net: stmmac: get phydev->interface from mac for mdio phy

* When posting revised patches, it's important to note what has changed.
  typically that goes below the scissors ('---').

  Something like this;

  v2:
  * Fixed blah
  * Updated foo

* Please read the FAQ
  https://kernel.org/doc/html/latest/process/maintainer-netdev.html

>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 1a5b8dab5e9b..debfcb045c22 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -1162,6 +1162,12 @@ static int stmmac_init_phy(struct net_device *dev)
>  			return -ENODEV;
>  		}
>  
> +		/* If we know the interface, it defines which PHY interface */
> +		if (priv->plat->phy_interface > 0) {
> +			phydev->interface = priv->plat->phy_interface;
> +			netdev_dbg(priv->dev, "Override default phy interface\n");
> +		}
> +
>  		ret = phylink_connect_phy(priv->phylink, phydev);
>  	}
>  
> -- 
> 2.20.1
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <simon.horman@corigine.com>
To: Guan Wentao <guanwentao@uniontech.com>
Cc: peppe.cavallaro@st.com, alexandre.torgue@foss.st.com,
	joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com,
	netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] net: stmmac: get phydev->interface from mac for mdio phy init
Date: Wed, 8 Feb 2023 14:11:52 +0100	[thread overview]
Message-ID: <Y+OfmMeP3Eto3K7t@corigine.com> (raw)
In-Reply-To: <20230208124025.5828-1-guanwentao@uniontech.com>

On Wed, Feb 08, 2023 at 08:40:25PM +0800, Guan Wentao wrote:
> The phy->interface from mdiobus_get_phy is default from phy_device_create.
> In some phy devices like at803x, use phy->interface to init rgmii delay.
> Use plat->phy_interface to init if know from stmmac_probe_config_dt.
> 
> Fixes: 74371272f97f ("net: stmmac: Convert to phylink and remove phylib logic")
> Signed-off-by: Guan Wentao <guanwentao@uniontech.com>
> ---

This is v2 of this patch, so let me make some comments about that.

* Firstly, unless asked to repost by a reviewer/maintainer,
  it's generally bad practice to post a patch(set) more than once within 24h.

* If it is a networking but fix, then it should be targeted at the 'net' tree.
  Otherwise, networking patches should be targeted at the 'net-next' tree.
  In either case this should be noted in the subject.

  Also, v2 (and so on), should be noted in the subject.

  Something like this:

  [PATCH v2 net-next] net: stmmac: get phydev->interface from mac for mdio phy

* When posting revised patches, it's important to note what has changed.
  typically that goes below the scissors ('---').

  Something like this;

  v2:
  * Fixed blah
  * Updated foo

* Please read the FAQ
  https://kernel.org/doc/html/latest/process/maintainer-netdev.html

>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 1a5b8dab5e9b..debfcb045c22 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -1162,6 +1162,12 @@ static int stmmac_init_phy(struct net_device *dev)
>  			return -ENODEV;
>  		}
>  
> +		/* If we know the interface, it defines which PHY interface */
> +		if (priv->plat->phy_interface > 0) {
> +			phydev->interface = priv->plat->phy_interface;
> +			netdev_dbg(priv->dev, "Override default phy interface\n");
> +		}
> +
>  		ret = phylink_connect_phy(priv->phylink, phydev);
>  	}
>  
> -- 
> 2.20.1
> 

  reply	other threads:[~2023-02-08 13:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 12:40 [PATCH] net: stmmac: get phydev->interface from mac for mdio phy init Guan Wentao
2023-02-08 12:40 ` Guan Wentao
2023-02-08 13:11 ` Simon Horman [this message]
2023-02-08 13:11   ` Simon Horman
2023-02-08 13:29   ` Andrew Lunn
2023-02-08 13:29     ` Andrew Lunn
2023-02-08 13:32 ` Russell King (Oracle)
2023-02-08 13:32   ` Russell King (Oracle)
  -- strict thread matches above, loose matches on Subject: below --
2023-02-08 11:20 Guan Wentao
2023-02-08 11:20 ` Guan Wentao
2023-02-08 13:27 ` Andrew Lunn
2023-02-08 13:27   ` Andrew Lunn

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=Y+OfmMeP3Eto3K7t@corigine.com \
    --to=simon.horman@corigine.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=guanwentao@uniontech.com \
    --cc=joabreu@synopsys.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peppe.cavallaro@st.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.