netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 0/3] net: phy: prevent linking breakage
@ 2013-05-28 11:43 Alexandre Belloni
  2013-05-28 11:43 ` [PATCHv2 1/3] " Alexandre Belloni
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Alexandre Belloni @ 2013-05-28 11:43 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, linux-arm-kernel, Russell King, Shawn Guo,
	Sascha Hauer, Alexandre Belloni

There is a linking issue when using phy_register_fixup{,_for_uid,_for_id} and
CONFIG_PHYLIB is not a builtin:

arch/arm/mach-at91/built-in.o: In function `ksz9021rn_phy_fixup':
:(.text+0x1174): undefined reference to `mdiobus_write'
:(.text+0x1188): undefined reference to `mdiobus_write'
:(.text+0x119c): undefined reference to `mdiobus_write'
:(.text+0x11b0): undefined reference to `mdiobus_write'
arch/arm/mach-at91/built-in.o: In function `sama5_dt_device_init':
:(.init.text+0x1e34): undefined reference to `phy_register_fixup_for_uid'

This has been solved for arch/arm/mach-mxs/ and arch/arm/mach-imx/ by testing
IS_BUILTIN(CONFIG_PHYLIB) before calling the functions.

The first patch is an attempt at solving that issue globally.

The following patches remove the unnecessary IS_BUILTIN(CONFIG_PHYLIB) checks.

Quickly greping into the code shows that the issue may arise in:

arch/powerpc/platforms/85xx/mpc85xx_mds.c
arch/arm/mach-davinci/board-dm644x-evm.c
arch/arm/mach-orion5x/dns323-setup.c
arch/arm/mach-at91/board-dt-sama5.c

Changes in v2:
 - indentation fixes
 - use static inline function instead of defines and return -ENOTSUPP

Alexandre Belloni (3):
  net: phy: prevent linking breakage
  arm: mxs: don't check for CONFIG_PHYLIB as builtin
  arm: imx: don't check for CONFIG_PHYLIB as builtin

 arch/arm/mach-imx/mach-imx6q.c | 23 ++++++++++-------------
 arch/arm/mach-mxs/mach-mxs.c   |  5 ++---
 drivers/net/phy/phy_device.c   |  6 ++++++
 include/linux/phy.h            | 26 ++++++++++++++++++++++++++
 4 files changed, 44 insertions(+), 16 deletions(-)

-- 
1.8.1.2

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-06-05 11:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-28 11:43 [PATCHv2 0/3] net: phy: prevent linking breakage Alexandre Belloni
2013-05-28 11:43 ` [PATCHv2 1/3] " Alexandre Belloni
2013-05-28 20:09   ` David Miller
2013-05-29  8:21     ` Alexandre Belloni
2013-05-30  9:42       ` David Miller
2013-06-04 15:07         ` Arnd Bergmann
2013-06-04 15:36           ` Florian Fainelli
2013-06-04 16:01             ` Arnd Bergmann
2013-06-04 16:09               ` Florian Fainelli
2013-06-04 17:17                 ` Arnd Bergmann
2013-06-05  9:23                 ` Alexandre Belloni
2013-06-05 11:21                   ` Arnd Bergmann
2013-05-28 11:43 ` [PATCHv2 2/3] arm: mxs: don't check for CONFIG_PHYLIB as builtin Alexandre Belloni
2013-05-28 11:43 ` [PATCHv2 3/3] arm: imx: " Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).