Skip to contentSkip to conversation

net: phy: Fix modular PHYLIB build

PATCH Applied Florian Fainelli 3 participants 3 messages Apr 27, 2018 – Apr 28, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: phy: Fix modular PHYLIB build

After commit c59530d0d5dc ("net: Move PHY statistics code into PHY library helpers") we made net/core/ethtool.c reference symbols which are part of the library which can be modular. David introduced a temporary fix with 1ecd6e8ad996 ("phy: Temporary build fix after phylib changes.") which would prevent such modularity.

This is not desireable of course, so instead, just inline the functions into include/linux/phy.h to keep both options available.

Fixes c59530d0d5dc ("net: Move PHY statistics code into PHY library helpers")
Fixes 1ecd6e8ad996 ("phy: Temporary build fix after phylib changes.")
---
 drivers/net/phy/Kconfig |  3 ++-
 drivers/net/phy/phy.c   | 48 -----------------------------------------------
 include/linux/phy.h     | 50 +++++++++++++++++++++++++++++++++++++------------
 3 files changed, 40 insertions(+), 61 deletions(-)
drivers/net/phy/Kconfig +2 -1
index 7c5e8c1e9370..edb8b9ab827f 100644
@@ -9,6 +9,7 @@ menuconfig MDIO_DEVICE
 
 config MDIO_BUS
 	tristate
+	default m if PHYLIB=m
 	default MDIO_DEVICE
 	help
 	  This internal symbol is used for link time dependencies and it
@@ -170,7 +171,7 @@ config PHYLINK
 	  autonegotiation modes.
 
 menuconfig PHYLIB
-	bool "PHY Device support and infrastructure"
+	tristate "PHY Device support and infrastructure"
 	depends on NETDEVICES
 	select MDIO_DEVICE
 	help
drivers/net/phy/phy.c +0 -48

51 lines not on this page · raw message

include/linux/phy.h +38 -12

65 lines not on this page · raw message

Signature · 1 line
2.14.1
#1 lore raw
Quoted 6 lines · Florian Fainelli

After commit c59530d0d5dc ("net: Move PHY statistics code into PHY library helpers") we made net/core/ethtool.c reference symbols which are part of the library which can be modular. David introduced a temporary fix with 1ecd6e8ad996 ("phy: Temporary build fix after phylib changes.") which would prevent such modularity.

Quoted 6 lines

This is not desireable of course, so instead, just inline the functions into include/linux/phy.h to keep both options available.

Fixes c59530d0d5dc ("net: Move PHY statistics code into PHY library helpers")
Fixes 1ecd6e8ad996 ("phy: Temporary build fix after phylib changes.")

Confirmed that this also fixes the build when CONFIG_PHYLIB is off. Thanks.

maintainer Applied
#2 lore raw
In reply to Florian Fainelli

From: Florian Fainelli <[email protected]>
Date: Fri, 27 Apr 2018 12:41:49 -0700

Quoted 6 lines

After commit c59530d0d5dc ("net: Move PHY statistics code into PHY library helpers") we made net/core/ethtool.c reference symbols which are part of the library which can be modular. David introduced a temporary fix with 1ecd6e8ad996 ("phy: Temporary build fix after phylib changes.") which would prevent such modularity.

Quoted 6 lines

This is not desireable of course, so instead, just inline the functions into include/linux/phy.h to keep both options available.

Fixes c59530d0d5dc ("net: Move PHY statistics code into PHY library helpers")
Fixes 1ecd6e8ad996 ("phy: Temporary build fix after phylib changes.")

Applied, thanks Florian.