lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aQ4ZmXB_eFjKXgIv@shell.armlinux.org.uk>
Date: Fri, 7 Nov 2025 16:08:57 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Emil Renner Berthing <kernel@...il.dk>
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
	Alexandre Torgue <alexandre.torgue@...s.st.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Jerome Brunet <jbrunet@...libre.com>,
	Keguang Zhang <keguang.zhang@...il.com>,
	Kevin Hilman <khilman@...libre.com>,
	linux-amlogic@...ts.infradead.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org, linux-mips@...r.kernel.org,
	linux-stm32@...md-mailman.stormreply.com,
	Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
	Matthias Brugger <matthias.bgg@...il.com>,
	Maxime Coquelin <mcoquelin.stm32@...il.com>,
	Minda Chen <minda.chen@...rfivetech.com>,
	Neil Armstrong <neil.armstrong@...aro.org>, netdev@...r.kernel.org,
	Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@...l.toshiba>,
	Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next 11/16] net: stmmac: starfive: use
 stmmac_get_phy_intf_sel()

On Fri, Nov 07, 2025 at 11:00:35AM -0500, Emil Renner Berthing wrote:
> Quoting Russell King (Oracle) (2025-11-07 15:28:55)
> > Use stmmac_get_phy_intf_sel() to decode the PHY interface mode to the
> > phy_intf_sel value, validate the result and use that to set the
> > control register to select the operating mode for the DWMAC core.
> >
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
> > ---
> >  .../ethernet/stmicro/stmmac/dwmac-starfive.c  | 22 +++++--------------
> >  1 file changed, 6 insertions(+), 16 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> > index 1ef72576c6f1..00078b7a6486 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> > @@ -35,25 +35,15 @@ static int starfive_dwmac_set_mode(struct plat_stmmacenet_data *plat_dat)
> >         struct starfive_dwmac *dwmac = plat_dat->bsp_priv;
> >         struct regmap *regmap;
> >         unsigned int args[2];
> > -       unsigned int mode;
> > +       int phy_intf_sel;
> >         int err;
> >
> > -       switch (plat_dat->phy_interface) {
> > -       case PHY_INTERFACE_MODE_RMII:
> > -               mode = STARFIVE_DWMAC_PHY_INFT_RMII;
> > -               break;
> > -
> > -       case PHY_INTERFACE_MODE_RGMII:
> > -       case PHY_INTERFACE_MODE_RGMII_ID:
> > -       case PHY_INTERFACE_MODE_RGMII_RXID:
> > -       case PHY_INTERFACE_MODE_RGMII_TXID:
> > -               mode = STARFIVE_DWMAC_PHY_INFT_RGMII;
> > -               break;
> 
> After these two patches the STARFIVE_DWMAC_PHY_INFT_RMII and ..RGMII macros are
> left unused.

Thanks, I'll remove them in this patch.

> Maybe just squash the patches and remove the definitions?

It's two logical changes, thus two patches. Reviewers find that this
makes it easier to review.

Given the number of platform glues that I'm modifying, I don't want
to change some of them using one big all encompassing patch and
others as a set of logical changes - that would be totally insane
to manage.

-- 
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ