[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <jzapsbgrdbpv7ei7uoet5aqxgvnpdqsjpm7amlvbveqnfk2bao@ck5q63hks3zz>
Date: Wed, 3 Apr 2024 15:37:37 +0300
From: Serge Semin <fancer.lancer@...il.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Yanteng Si <siyanteng@...ngson.cn>, andrew@...n.ch,
hkallweit1@...il.com, peppe.cavallaro@...com, alexandre.torgue@...s.st.com,
joabreu@...opsys.com, Jose.Abreu@...opsys.com, chenhuacai@...ngson.cn,
guyinggang@...ngson.cn, netdev@...r.kernel.org, chris.chenfeiyang@...il.com
Subject: Re: [PATCH net-next v8 09/11] net: stmmac: dwmac-loongson: Fix half
duplex
On Fri, Mar 22, 2024 at 07:56:44PM +0000, Russell King (Oracle) wrote:
> On Fri, Mar 22, 2024 at 09:07:19PM +0300, Serge Semin wrote:
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > index 25519952f754..24ff5d1eb963 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > @@ -936,6 +936,22 @@ static void stmmac_mac_flow_ctrl(struct stmmac_priv *priv, u32 duplex)
> > priv->pause, tx_cnt);
> > }
> >
> > +static unsigned long stmmac_mac_get_caps(struct phylink_config *config,
> > + phy_interface_t interface)
> > +{
> > + struct stmmac_priv *priv = netdev_priv(to_net_dev(config->dev));
> > +
> > + /* Get the MAC-specific capabilities */
> > + stmmac_mac_phylink_get_caps(priv);
> > +
> > + config->mac_capabilities = priv->hw->link.caps;
> > +
> > + if (priv->plat->max_speed)
> > + phylink_limit_mac_speed(config, priv->plat->max_speed);
> > +
> > + return config->mac_capabilities;
>
> Yes, I think your approach is better - and it still allows for the
> platform's capabilities to be masked in towards the end of this
> function.
Sorry for the long-term response. Thanks for your comment. Seeing
Yanteng is struggling much with this series review I'll convert the
suggested change into a patchset (taking into account that the change
implies some fixes) and submit it for review later on this week. After
finishing the review stage, the series could be either merged in right
away or Yanteng will be able to pick it up and add it into his patchset.
-Serge(y)
>
> Thanks.
>
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists