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] [day] [month] [year] [list]
Date: Tue, 6 Jun 2023 11:30:47 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@...com>, Alexandre Torgue <alexandre.torgue@...s.st.com>, 
	Jose Abreu <joabreu@...opsys.com>, "David S . Miller" <davem@...emloft.net>, 
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	Maxime Coquelin <mcoquelin.stm32@...il.com>, Simon Horman <simon.horman@...igine.com>, 
	netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com, 
	linux-arm-kernel@...ts.infradead.org, linux-renesas-soc@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Geert Uytterhoeven <geert+renesas@...der.be>
Subject: Re: [PATCH] net: stmmac: Fix build without PCS_LYNX

On Tue, Jun 6, 2023 at 10:27 AM Geert Uytterhoeven
<geert+renesas@...der.be> wrote:
> If STMMAC_ETH=y, but PCS_LYNX=n (e.g. shmobile_defconfig):
>
>     arm-linux-gnueabihf-ld: drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.o: in function `stmmac_mdio_unregister':
>     stmmac_mdio.c:(.text+0xfbc): undefined reference to `lynx_pcs_destroy'
>
> As pcs_lynx is used only on dwmac_socfpga, fix this by adding a check
> for PCS_LYNX to the cleanup path in the generic driver.
>
> Fixes: 5d1f3fe7d2d54d04 ("net: stmmac: dwmac-sogfpga: use the lynx pcs driver")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> index c784a6731f08e108..53ed59d732210814 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> @@ -665,7 +665,7 @@ int stmmac_mdio_unregister(struct net_device *ndev)
>         if (priv->hw->xpcs)
>                 xpcs_destroy(priv->hw->xpcs);
>
> -       if (priv->hw->lynx_pcs)
> +       if (IS_ENABLED(CONFIG_PCS_LYNX) && priv->hw->lynx_pcs)
>                 lynx_pcs_destroy(priv->hw->lynx_pcs);
>
>         mdiobus_unregister(priv->mii);

As pointed out by Arnd, this doesn't work when PCS_LYNX is a loadable
module and STMMAC is built-in:
https://lore.kernel.org/r/11bd37e9-c62e-46ba-9456-8e3b353df28f@app.fastmail.com

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ