netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: mvmdio: add select PHYLIB
@ 2013-04-13 16:18 Thomas Petazzoni
  2013-04-13 20:48 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2013-04-13 16:18 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev, Andrew Lunn, Jason Cooper, Maen Suleiman, Lior Amsalem,
	Gregory Clement, Ezequiel Garcia, Florian Fainelli

The mvmdio driver uses the phylib API, so it should select the PHYLIB
symbol, otherwise, a build with mvmdio (but without mvneta) fails to
build with undefined symbols such as mdiobus_unregister, mdiobus_free,
etc.

The mvneta driver does not use the phylib API directly, so it does not
need to select PHYLIB. It already selects the mvmdio driver anyway.

Historically, this problem is due to the fact that the PHY handling
was originally part of mvneta, and was later moved to a separate
driver, without updating the Kconfig select statements
accordingly. And since there was no functional reason to use mvmdio
without mvneta, this case was not tested.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
---
This problem has been around since Linux 3.8 and causes build issues
when CONFIG_MVMDIO={y,m} and CONFIG_PHYLIB is not enabled. If
possible, it should therefore be applied on both 3.8 and 3.9 kernels.
---
 drivers/net/ethernet/marvell/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/Kconfig b/drivers/net/ethernet/marvell/Kconfig
index edfba93..434e33c 100644
--- a/drivers/net/ethernet/marvell/Kconfig
+++ b/drivers/net/ethernet/marvell/Kconfig
@@ -33,6 +33,7 @@ config MV643XX_ETH
 
 config MVMDIO
 	tristate "Marvell MDIO interface support"
+	select PHYLIB
 	---help---
 	  This driver supports the MDIO interface found in the network
 	  interface units of the Marvell EBU SoCs (Kirkwood, Orion5x,
@@ -45,7 +46,6 @@ config MVMDIO
 config MVNETA
 	tristate "Marvell Armada 370/XP network interface support"
 	depends on MACH_ARMADA_370_XP
-	select PHYLIB
 	select MVMDIO
 	---help---
 	  This driver supports the network interface units in the
-- 
1.7.9.5

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

* Re: [PATCH] net: mvmdio: add select PHYLIB
  2013-04-13 16:18 [PATCH] net: mvmdio: add select PHYLIB Thomas Petazzoni
@ 2013-04-13 20:48 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-04-13 20:48 UTC (permalink / raw)
  To: thomas.petazzoni
  Cc: netdev, andrew, jason, maen, alior, gregory.clement,
	ezequiel.garcia, florian

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Sat, 13 Apr 2013 18:18:56 +0200

> The mvmdio driver uses the phylib API, so it should select the PHYLIB
> symbol, otherwise, a build with mvmdio (but without mvneta) fails to
> build with undefined symbols such as mdiobus_unregister, mdiobus_free,
> etc.
> 
> The mvneta driver does not use the phylib API directly, so it does not
> need to select PHYLIB. It already selects the mvmdio driver anyway.
> 
> Historically, this problem is due to the fact that the PHY handling
> was originally part of mvneta, and was later moved to a separate
> driver, without updating the Kconfig select statements
> accordingly. And since there was no functional reason to use mvmdio
> without mvneta, this case was not tested.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Reported-by: Fengguang Wu <fengguang.wu@intel.com>

Applied and queued up for -stable, thanks.

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

end of thread, other threads:[~2013-04-13 20:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-13 16:18 [PATCH] net: mvmdio: add select PHYLIB Thomas Petazzoni
2013-04-13 20:48 ` David Miller

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