Thread (4 messages) flat view 4 messages, 3 authors, 2023-06-07

Re: [PATCH 1/2] stmmac: fix pcs_lynx link failure

From: "Russell King (Oracle)" <linux@armlinux.org.uk>
Date: 2023-06-07 14:12:33
Also in: linux-arm-kernel, lkml

On Wed, Jun 07, 2023 at 03:56:32PM +0200, Arnd Bergmann wrote:
From: Arnd Bergmann <arnd@arndb.de>

The mdio code in stmmac now directly links into both the lynx_pcs and
the xpcs device drivers, but the lynx_pcs dependency is only enforced
for the altera variant of stmmac, which is the one that actually uses it.

Building stmmac for a non-altera platform therefore causes a link
failure:

arm-linux-gnueabi-ld: drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.o: in function `stmmac_mdio_unregister':
stmmac_mdio.c:(.text+0x1418): undefined reference to `lynx_pcs_destroy'

I've tried to come up with a patch that moves this dependency back into
the dwmac-socfpga.c file, but there was no easy and obvious way to
do this. It also seems that this would not be a proper solution, but
instead there should be a real abstraction for pcs drivers that lets
device drivers handle this transparently.
There is already a patch set on netdev fixing this properly.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help