* [PATCH] powerpc: Fix fs_enet module build
@ 2007-11-13 18:32 Jochen Friedrich
2007-11-14 5:09 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Jochen Friedrich @ 2007-11-13 18:32 UTC (permalink / raw)
To: linuxppc-embedded
Cc: Marcelo Tosatti, Scott Wood, linux-kernel, Jeff Garzik, netdev, akpm
If fs_enet is build as module, on PPC_CPM_NEW_BINDING platforms
mii-fec/mii-bitbang should be build as module, as well. On other
platforms, mii-fec/mii-bitbang must be included into the main module.
Otherwise some symbols remain undefined. Additionally, fs_enet uses
libphy, so add a select PHYLIB.
Building modules, stage 2.
MODPOST 5 modules
ERROR: "fs_scc_ops" [drivers/net/fs_enet/fs_enet.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
This patch replaces powerpc-fs_enet-select-phylib-as-the-driver-needs-it.patch
from -mm.
drivers/net/fs_enet/Kconfig | 11 ++++++++++-
drivers/net/fs_enet/Makefile | 15 ++++++++++++---
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/drivers/net/fs_enet/Kconfig b/drivers/net/fs_enet/Kconfig
index 2765e49..562ea68 100644
--- a/drivers/net/fs_enet/Kconfig
+++ b/drivers/net/fs_enet/Kconfig
@@ -2,6 +2,7 @@ config FS_ENET
tristate "Freescale Ethernet Driver"
depends on CPM1 || CPM2
select MII
+ select PHYLIB
config FS_ENET_HAS_SCC
bool "Chip has an SCC usable for ethernet"
@@ -11,11 +12,19 @@ config FS_ENET_HAS_SCC
config FS_ENET_HAS_FCC
bool "Chip has an FCC usable for ethernet"
depends on FS_ENET && CPM2
- select MDIO_BITBANG
default y
config FS_ENET_HAS_FEC
bool "Chip has an FEC usable for ethernet"
depends on FS_ENET && CPM1
+ select FS_ENET_MDIO_FEC
default y
+config FS_ENET_MDIO_FEC
+ tristate "MDIO driver for FEC"
+ depends on FS_ENET && CPM1
+
+config FS_ENET_MDIO_FCC
+ tristate "MDIO driver for FCC"
+ depends on FS_ENET && CPM2
+ select MDIO_BITBANG
diff --git a/drivers/net/fs_enet/Makefile b/drivers/net/fs_enet/Makefile
index 02d4dc1..1ffbe07 100644
--- a/drivers/net/fs_enet/Makefile
+++ b/drivers/net/fs_enet/Makefile
@@ -4,7 +4,16 @@
obj-$(CONFIG_FS_ENET) += fs_enet.o
-obj-$(CONFIG_8xx) += mac-fec.o mac-scc.o mii-fec.o
-obj-$(CONFIG_CPM2) += mac-fcc.o mii-bitbang.o
+fs_enet-$(CONFIG_FS_ENET_HAS_SCC) += mac-scc.o
+fs_enet-$(CONFIG_FS_ENET_HAS_FEC) += mac-fec.o
+fs_enet-$(CONFIG_FS_ENET_HAS_FCC) += mac-fcc.o
-fs_enet-objs := fs_enet-main.o
+ifeq ($(CONFIG_PPC_CPM_NEW_BINDING),y)
+obj-$(CONFIG_FS_ENET_MDIO_FEC) += mii-fec.o
+obj-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o
+else
+fs_enet-$(CONFIG_FS_ENET_MDIO_FEC) += mii-fec.o
+fs_enet-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o
+endif
+
+fs_enet-objs := fs_enet-main.o $(fs_enet-m)
--
1.5.3.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: Fix fs_enet module build
2007-11-13 18:32 [PATCH] powerpc: Fix fs_enet module build Jochen Friedrich
@ 2007-11-14 5:09 ` David Miller
2007-11-14 11:59 ` Jochen Friedrich
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2007-11-14 5:09 UTC (permalink / raw)
To: jochen
Cc: linuxppc-embedded, marcelo, scottwood, linux-kernel, jeff, netdev, akpm
From: Jochen Friedrich <jochen@scram.de>
Date: Tue, 13 Nov 2007 19:32:08 +0100
> If fs_enet is build as module, on PPC_CPM_NEW_BINDING platforms
> mii-fec/mii-bitbang should be build as module, as well. On other
> platforms, mii-fec/mii-bitbang must be included into the main module.
> Otherwise some symbols remain undefined. Additionally, fs_enet uses
> libphy, so add a select PHYLIB.
>
> Building modules, stage 2.
> MODPOST 5 modules
> ERROR: "fs_scc_ops" [drivers/net/fs_enet/fs_enet.ko] undefined!
> make[1]: *** [__modpost] Error 1
> make: *** [modules] Error 2
>
> Signed-off-by: Jochen Friedrich <jochen@scram.de>
This is truly ugly and creates an unnecessarily hard to
maintain and complex driver.
Please find a way to fix this for real, so that the
PPC_CPM_NEW_BINDING ifdef is not necessary at all and
things get built modular or not naturally as we handle
things for other cases like this.
THanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: Fix fs_enet module build
2007-11-14 5:09 ` David Miller
@ 2007-11-14 11:59 ` Jochen Friedrich
2007-11-14 23:51 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Jochen Friedrich @ 2007-11-14 11:59 UTC (permalink / raw)
To: David Miller
Cc: linuxppc-embedded, marcelo, scottwood, linux-kernel, jeff, netdev, akpm
Hi David,
> This is truly ugly and creates an unnecessarily hard to
> maintain and complex driver.
>
> Please find a way to fix this for real, so that the
> PPC_CPM_NEW_BINDING ifdef is not necessary at all and
> things get built modular or not naturally as we handle
> things for other cases like this.
I know it's ugly, however, module building is completely
broken right now and I just want to provide a quick and
ugly fix until both that ppc->powerpc transition and the
new binding transition are over. Noone wants to touch the
old stuff any more as it's a pita and it's already scheduled
for removal in a couple of months.
Thanks,
Jochen
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc: Fix fs_enet module build
2007-11-14 11:59 ` Jochen Friedrich
@ 2007-11-14 23:51 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2007-11-14 23:51 UTC (permalink / raw)
To: jochen
Cc: linuxppc-embedded, marcelo, scottwood, linux-kernel, jeff, netdev, akpm
From: Jochen Friedrich <jochen@scram.de>
Date: Wed, 14 Nov 2007 12:59:33 +0100
> I know it's ugly, however, module building is completely
> broken right now and I just want to provide a quick and
> ugly fix until both that ppc->powerpc transition and the
> new binding transition are over. Noone wants to touch the
> old stuff any more as it's a pita and it's already scheduled
> for removal in a couple of months.
Fair enough, I'll apply the patch.
Thanks for the explanation.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] [POWERPC] Fix fs_enet module build
2007-11-03 20:45 [PATCH] [POWERPC] " Jochen Friedrich
@ 2007-11-05 16:19 ` Scott Wood
0 siblings, 0 replies; 6+ messages in thread
From: Scott Wood @ 2007-11-05 16:19 UTC (permalink / raw)
To: Jochen Friedrich; +Cc: linuxppc-embedded, linux-kernel, Jeff Garzik, netdev
Jochen Friedrich wrote:
> diff --git a/drivers/net/fs_enet/Makefile b/drivers/net/fs_enet/Makefile
> index 02d4dc1..2f7563a 100644
> --- a/drivers/net/fs_enet/Makefile
> +++ b/drivers/net/fs_enet/Makefile
> @@ -4,7 +4,15 @@
>
> obj-$(CONFIG_FS_ENET) += fs_enet.o
>
> -obj-$(CONFIG_8xx) += mac-fec.o mac-scc.o mii-fec.o
> -obj-$(CONFIG_CPM2) += mac-fcc.o mii-bitbang.o
> +fs_enet-$(CONFIG_8xx) += mac-fec.o mac-scc.o
> +fs_enet-$(CONFIG_CPM2) += mac-fcc.o
> +
> +ifeq ($(CONFIG_8xx),y)
> + obj-$(CONFIG_FS_ENET) += mii-fec.o
> +endif
> +
> +ifeq ($(CONFIG_CPM2),y)
> + obj-$(CONFIG_FS_ENET) += mii-bitbang.o
> +endif
>
> fs_enet-objs := fs_enet-main.o
If we're going to mess with this, we should probably just make
CONFIG_FS_ENET_SCC, CONFIG_FS_ENET_FCC, and CONFIG_FS_ENET_FEC, and have
them depend on CONFIG_FS_ENET.
-Scott
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] [POWERPC] Fix fs_enet module build
@ 2007-11-03 20:45 Jochen Friedrich
2007-11-05 16:19 ` Scott Wood
0 siblings, 1 reply; 6+ messages in thread
From: Jochen Friedrich @ 2007-11-03 20:45 UTC (permalink / raw)
To: linuxppc-embedded
Cc: linux-kernel, Scott Wood, linux-kernel, Jeff Garzik, netdev
If fs_enet is build as module, mii-fec/mii-bitbang should be build as
module, as well. Otherwise some symbols remain undefined.
Building modules, stage 2.
MODPOST 5 modules
ERROR: "fs_scc_ops" [drivers/net/fs_enet/fs_enet.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
This can be pulled from git://git.bocc.de/dbox2.git for-2.6.24
drivers/net/fs_enet/Makefile | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/net/fs_enet/Makefile b/drivers/net/fs_enet/Makefile
index 02d4dc1..2f7563a 100644
--- a/drivers/net/fs_enet/Makefile
+++ b/drivers/net/fs_enet/Makefile
@@ -4,7 +4,15 @@
obj-$(CONFIG_FS_ENET) += fs_enet.o
-obj-$(CONFIG_8xx) += mac-fec.o mac-scc.o mii-fec.o
-obj-$(CONFIG_CPM2) += mac-fcc.o mii-bitbang.o
+fs_enet-$(CONFIG_8xx) += mac-fec.o mac-scc.o
+fs_enet-$(CONFIG_CPM2) += mac-fcc.o
+
+ifeq ($(CONFIG_8xx),y)
+ obj-$(CONFIG_FS_ENET) += mii-fec.o
+endif
+
+ifeq ($(CONFIG_CPM2),y)
+ obj-$(CONFIG_FS_ENET) += mii-bitbang.o
+endif
fs_enet-objs := fs_enet-main.o
--
1.5.3.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-11-14 23:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-13 18:32 [PATCH] powerpc: Fix fs_enet module build Jochen Friedrich
2007-11-14 5:09 ` David Miller
2007-11-14 11:59 ` Jochen Friedrich
2007-11-14 23:51 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2007-11-03 20:45 [PATCH] [POWERPC] " Jochen Friedrich
2007-11-05 16:19 ` Scott Wood
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).