[PATCH net 1/1] net: stmmac: update MAC capabilities when tx queues are updated

Gan, Yi Fang yi.fang.gan at intel.com
Thu Oct 19 20:33:16 PDT 2023


Hi Russell King and Paolo,

Thank you for the feedbacks. I already submit V2 with the helper.

BR,
Fang

> -----Original Message-----
> From: Paolo Abeni <pabeni at redhat.com>
> Sent: Thursday, October 19, 2023 6:25 PM
> To: Russell King (Oracle) <linux at armlinux.org.uk>; Gan, Yi Fang
> <yi.fang.gan at intel.com>
> Cc: Alexandre Torgue <alexandre.torgue at foss.st.com>; Jose Abreu
> <joabreu at synopsys.com>; David S . Miller <davem at davemloft.net>; Eric
> Dumazet <edumazet at google.com>; Jakub Kicinski <kuba at kernel.org>;
> Maxime Coquelin <mcoquelin.stm32 at gmail.com>; Ong, Boon Leong
> <boon.leong.ong at intel.com>; netdev at vger.kernel.org; linux-stm32 at st-md-
> mailman.stormreply.com; linux-arm-kernel at lists.infradead.org; linux-
> kernel at vger.kernel.org; Sit, Michael Wei Hong
> <michael.wei.hong.sit at intel.com>; Looi, Hong Aun <hong.aun.looi at intel.com>;
> Voon, Weifeng <weifeng.voon at intel.com>; Song, Yoong Siang
> <yoong.siang.song at intel.com>
> Subject: Re: [PATCH net 1/1] net: stmmac: update MAC capabilities when tx
> queues are updated
> 
> On Wed, 2023-10-18 at 08:25 +0100, Russell King (Oracle) wrote:
> > On Wed, Oct 18, 2023 at 10:31:36AM +0800, Gan, Yi Fang wrote:
> > > From: Michael Sit Wei Hong <michael.wei.hong.sit at intel.com>
> > >
> > > Upon boot up, the driver will configure the MAC capabilities based
> > > on the maximum number of tx and rx queues. When the user changes the
> > > tx queues to single queue, the MAC should be capable of supporting
> > > Half Duplex, but the driver does not update the MAC capabilities
> > > when it is configured so.
> > >
> > > Using the stmmac_reinit_queues() to check the number of tx queues
> > > and set the MAC capabilities accordingly.
> >
> > There is other setup elsewhere in the driver that fiddles with this in
> > stmmac_phy_setup(). Maybe provide a helper function so that this
> > decision making can be made in one function called from both these
> > locations, so if the decision making for HD support changes, only one
> > place needs changing?
> 
> Indeed that looks both straight-forward and more robust.
> 
> @Gan, Yi Fang: please send a v2 introducing and using such helper, thanks!
> 
> Paolo



More information about the linux-arm-kernel mailing list