Re: [PATCH] phylib: Don't allow core of phylib to build as a module
Kumar Gala wrote: The core portions of the phylib aren't capable of being used as a module. This isn't really any different than something like i2c in that the bus driver and core need to be built into the kernel. Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> --- Jeff, please consider this for 2.6.26 as w/o it we get build issues if phylib is config'd as a module on ppc. drivers/net/phy/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 6eb2d31..ab04cc7 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -3,7 +3,7 @@ # menuconfig PHYLIB - tristate "PHY Device support and infrastructure" + bool "PHY Device support and infrastructure" depends on !S390 depends on NET_ETHERNET What are the issues? The core _should_ be able to be built as a module. Jeff ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] phylib: Don't allow core of phylib to build as a module
On Mon, Jun 02, 2008 at 11:25:14AM -0500, Kumar Gala wrote: > The core provides functions like phy_read/phy_write. Andy has recently > introduced board level workaround/fixups. The problem is these > workarounds tend to use phy_read/phy_write and the board/platform code is > not built as modules. So why not have those platforms select PHYLIB? -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] phylib: Don't allow core of phylib to build as a module
Kumar Gala wrote: On Jun 2, 2008, at 11:03 AM, Jeff Garzik wrote: Kumar Gala wrote: The core portions of the phylib aren't capable of being used as a module. This isn't really any different than something like i2c in that the bus driver and core need to be built into the kernel. Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> --- Jeff, please consider this for 2.6.26 as w/o it we get build issues if phylib is config'd as a module on ppc. drivers/net/phy/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 6eb2d31..ab04cc7 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -3,7 +3,7 @@ # menuconfig PHYLIB -tristate "PHY Device support and infrastructure" +bool "PHY Device support and infrastructure" depends on !S390 depends on NET_ETHERNET What are the issues? The core _should_ be able to be built as a module. The core provides functions like phy_read/phy_write. Andy has recently introduced board level workaround/fixups. The problem is these workarounds tend to use phy_read/phy_write and the board/platform code is not built as modules. So we get errors like: arch/powerpc/platforms/built-in.o: In function `mpc8568_mds_phy_fixups': /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/mpc85xx_mds.c:99: undefined reference to `phy_write' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/mpc85xx_mds.c:104: undefined reference to `phy_read' The whole world isn't embedded ppc, we use this stuff elsewhere too. You guys need to figure out something that doesn't require phylib be built-in on ALL platforms, but only the platforms that require it. Or, update the platform to not require built-in -- convert the board code to function pointers, and execute them later on somehow, for example. Jeff ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] phylib: Don't allow core of phylib to build as a module
On Jun 2, 2008, at 11:03 AM, Jeff Garzik wrote: Kumar Gala wrote: The core portions of the phylib aren't capable of being used as a module. This isn't really any different than something like i2c in that the bus driver and core need to be built into the kernel. Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> --- Jeff, please consider this for 2.6.26 as w/o it we get build issues if phylib is config'd as a module on ppc. drivers/net/phy/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 6eb2d31..ab04cc7 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -3,7 +3,7 @@ # menuconfig PHYLIB - tristate "PHY Device support and infrastructure" + bool "PHY Device support and infrastructure" depends on !S390 depends on NET_ETHERNET What are the issues? The core _should_ be able to be built as a module. The core provides functions like phy_read/phy_write. Andy has recently introduced board level workaround/fixups. The problem is these workarounds tend to use phy_read/phy_write and the board/ platform code is not built as modules. So we get errors like: arch/powerpc/platforms/built-in.o: In function `mpc8568_mds_phy_fixups': /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:99: undefined reference to `phy_write' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:104: undefined reference to `phy_read' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:110: undefined reference to `phy_write' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:115: undefined reference to `phy_write' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:120: undefined reference to `phy_read' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:125: undefined reference to `phy_read' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:132: undefined reference to `phy_write' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:138: undefined reference to `phy_read' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:144: undefined reference to `phy_write' arch/powerpc/platforms/built-in.o: In function `mpc8568_fixup_125_clock': /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:68: undefined reference to `phy_read' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:73: undefined reference to `phy_write' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:78: undefined reference to `phy_write' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:83: undefined reference to `phy_read' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:88: undefined reference to `phy_write' arch/powerpc/platforms/built-in.o: In function `board_fixups': /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:246: undefined reference to `phy_register_fixup_for_id' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:247: undefined reference to `phy_register_fixup_for_id' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:251: undefined reference to `phy_register_fixup_for_id' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:246: undefined reference to `phy_register_fixup_for_id' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:247: undefined reference to `phy_register_fixup_for_id' arch/powerpc/platforms/built-in.o:/home/galak/git/master/powerpc/arch/ powerpc/platforms/85xx/mpc85xx_mds.c:251: more undefined references to `phy_register_fixup_for_id' follow make: *** [.tmp_vmlinux1] Error 1 - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] phylib: Don't allow core of phylib to build as a module
On Mon, Jun 02, 2008 at 11:25:14AM -0500, Kumar Gala wrote: > > On Jun 2, 2008, at 11:03 AM, Jeff Garzik wrote: > >> Kumar Gala wrote: >>> The core portions of the phylib aren't capable of being used as >>> a module. This isn't really any different than something like i2c >>> in that the bus driver and core need to be built into the kernel. >>> Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> >>> --- >>> Jeff, please consider this for 2.6.26 as w/o it we get build issues >>> if phylib is config'd as a module on ppc. >>> drivers/net/phy/Kconfig |2 +- >>> 1 files changed, 1 insertions(+), 1 deletions(-) >>> diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig >>> index 6eb2d31..ab04cc7 100644 >>> --- a/drivers/net/phy/Kconfig >>> +++ b/drivers/net/phy/Kconfig >>> @@ -3,7 +3,7 @@ >>> # >>> menuconfig PHYLIB >>> - tristate "PHY Device support and infrastructure" >>> + bool "PHY Device support and infrastructure" >>> depends on !S390 >>> depends on NET_ETHERNET >> >> What are the issues? >> >> The core _should_ be able to be built as a module. > > The core provides functions like phy_read/phy_write. Andy has recently > introduced board level workaround/fixups. The problem is these > workarounds tend to use phy_read/phy_write and the board/platform code is > not built as modules. > > So we get errors like: > > arch/powerpc/platforms/built-in.o: In function `mpc8568_mds_phy_fixups': > /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ > mpc85xx_mds.c:99: undefined reference to `phy_write' >... At first glance PHYLIB=n might also cause similar problems. Please send me the failing .config and I'll cook up a fix. > - k cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] phylib: Don't allow core of phylib to build as a module
On Jun 2, 2008, at 11:39 AM, Jeff Garzik wrote: Kumar Gala wrote: On Jun 2, 2008, at 11:03 AM, Jeff Garzik wrote: Kumar Gala wrote: The core portions of the phylib aren't capable of being used as a module. This isn't really any different than something like i2c in that the bus driver and core need to be built into the kernel. Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> --- Jeff, please consider this for 2.6.26 as w/o it we get build issues if phylib is config'd as a module on ppc. drivers/net/phy/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 6eb2d31..ab04cc7 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -3,7 +3,7 @@ # menuconfig PHYLIB -tristate "PHY Device support and infrastructure" +bool "PHY Device support and infrastructure" depends on !S390 depends on NET_ETHERNET What are the issues? The core _should_ be able to be built as a module. The core provides functions like phy_read/phy_write. Andy has recently introduced board level workaround/fixups. The problem is these workarounds tend to use phy_read/phy_write and the board/ platform code is not built as modules. So we get errors like: arch/powerpc/platforms/built-in.o: In function `mpc8568_mds_phy_fixups': /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:99: undefined reference to `phy_write' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:104: undefined reference to `phy_read' The whole world isn't embedded ppc, we use this stuff elsewhere too. You guys need to figure out something that doesn't require phylib be built-in on ALL platforms, but only the platforms that require it. I wasn't suggesting we build it always, just not let it be built as a module. Or, update the platform to not require built-in -- convert the board code to function pointers, and execute them later on somehow, for example. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] phylib: Don't allow core of phylib to build as a module
On Mon, 2 Jun 2008, Adrian Bunk wrote: > On Mon, Jun 02, 2008 at 11:25:14AM -0500, Kumar Gala wrote: > > > > On Jun 2, 2008, at 11:03 AM, Jeff Garzik wrote: > > > >> Kumar Gala wrote: > >>> The core portions of the phylib aren't capable of being used as > >>> a module. This isn't really any different than something like i2c > >>> in that the bus driver and core need to be built into the kernel. > >>> Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> > >>> --- > >>> Jeff, please consider this for 2.6.26 as w/o it we get build issues > >>> if phylib is config'd as a module on ppc. > >>> drivers/net/phy/Kconfig |2 +- > >>> 1 files changed, 1 insertions(+), 1 deletions(-) > >>> diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig > >>> index 6eb2d31..ab04cc7 100644 > >>> --- a/drivers/net/phy/Kconfig > >>> +++ b/drivers/net/phy/Kconfig > >>> @@ -3,7 +3,7 @@ > >>> # > >>> menuconfig PHYLIB > >>> - tristate "PHY Device support and infrastructure" > >>> + bool "PHY Device support and infrastructure" > >>> depends on !S390 > >>> depends on NET_ETHERNET > >> > >> What are the issues? > >> > >> The core _should_ be able to be built as a module. > > > > The core provides functions like phy_read/phy_write. Andy has recently > > introduced board level workaround/fixups. The problem is these > > workarounds tend to use phy_read/phy_write and the board/platform code is > > not built as modules. > > > > So we get errors like: > > > > arch/powerpc/platforms/built-in.o: In function `mpc8568_mds_phy_fixups': > > /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ > > mpc85xx_mds.c:99: undefined reference to `phy_write' > >... > > At first glance PHYLIB=n might also cause similar problems. > > Please send me the failing .config and I'll cook up a fix. > > > - k > > cu > Adrian defconfig attached. I think Scott might be right in that the simple fix would be to select PHYLIB from the MPC8568_MDS config in arch/powerpc/platforms/85xx/Kconfig. - k phylib-module.config.gz Description: GNU Zip compressed data ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] phylib: Don't allow core of phylib to build as a module
On Jun 2, 2008, at 11:39 AM, Jeff Garzik wrote: Kumar Gala wrote: On Jun 2, 2008, at 11:03 AM, Jeff Garzik wrote: Kumar Gala wrote: The core portions of the phylib aren't capable of being used as a module. This isn't really any different than something like i2c in that the bus driver and core need to be built into the kernel. Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> --- Jeff, please consider this for 2.6.26 as w/o it we get build issues if phylib is config'd as a module on ppc. drivers/net/phy/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 6eb2d31..ab04cc7 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -3,7 +3,7 @@ # menuconfig PHYLIB -tristate "PHY Device support and infrastructure" +bool "PHY Device support and infrastructure" depends on !S390 depends on NET_ETHERNET What are the issues? The core _should_ be able to be built as a module. The core provides functions like phy_read/phy_write. Andy has recently introduced board level workaround/fixups. The problem is these workarounds tend to use phy_read/phy_write and the board/ platform code is not built as modules. So we get errors like: arch/powerpc/platforms/built-in.o: In function `mpc8568_mds_phy_fixups': /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:99: undefined reference to `phy_write' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/ mpc85xx_mds.c:104: undefined reference to `phy_read' The whole world isn't embedded ppc, we use this stuff elsewhere too. You guys need to figure out something that doesn't require phylib be built-in on ALL platforms, but only the platforms that require it. Or, update the platform to not require built-in -- convert the board code to function pointers, and execute them later on somehow, for example. If you really think the core of the phylib should be able to be built as a module than we could possibly add function pointers to phy_dev to do the real phy_read()/phy_write() and change phy_read/_write to look like: int phy_read(struct phy_device *phydev, u16 regnum) { return phydev->read(phydev, regnum); } int phy_write(struct phy_device *phydev, u16 regnum, u16 val) { return phydev->write(phydev, regnum, val); } - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] phylib: Don't allow core of phylib to build as a module
On Jun 2, 2008, at 14:30, Kumar Gala wrote: On Jun 2, 2008, at 11:39 AM, Jeff Garzik wrote: If you really think the core of the phylib should be able to be built as a module than we could possibly add function pointers to phy_dev to do the real phy_read()/phy_write() and change phy_read/ _write to look like: int phy_read(struct phy_device *phydev, u16 regnum) { return phydev->read(phydev, regnum); } That would be a bit silly, since this is the definition of phy_read(): int phy_read(struct phy_device *phydev, u16 regnum) { int retval; struct mii_bus *bus = phydev->bus; BUG_ON(in_interrupt()); mutex_lock(&bus->mdio_lock); retval = bus->read(bus, phydev->addr, regnum); mutex_unlock(&bus->mdio_lock); return retval; } We could, of course, move phy_read *out* of the phylib module. And also phy_register_fixup and any other functions needed by board code. I'm partial to the select-it-if-you-need-it paradigm. Andy ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] phylib: Don't allow core of phylib to build as a module
Kumar Gala wrote: On Jun 2, 2008, at 11:39 AM, Jeff Garzik wrote: Kumar Gala wrote: On Jun 2, 2008, at 11:03 AM, Jeff Garzik wrote: Kumar Gala wrote: The core portions of the phylib aren't capable of being used as a module. This isn't really any different than something like i2c in that the bus driver and core need to be built into the kernel. Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> --- Jeff, please consider this for 2.6.26 as w/o it we get build issues if phylib is config'd as a module on ppc. drivers/net/phy/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 6eb2d31..ab04cc7 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -3,7 +3,7 @@ # menuconfig PHYLIB -tristate "PHY Device support and infrastructure" +bool "PHY Device support and infrastructure" depends on !S390 depends on NET_ETHERNET What are the issues? The core _should_ be able to be built as a module. The core provides functions like phy_read/phy_write. Andy has recently introduced board level workaround/fixups. The problem is these workarounds tend to use phy_read/phy_write and the board/platform code is not built as modules. So we get errors like: arch/powerpc/platforms/built-in.o: In function `mpc8568_mds_phy_fixups': /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/mpc85xx_mds.c:99: undefined reference to `phy_write' /home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/mpc85xx_mds.c:104: undefined reference to `phy_read' The whole world isn't embedded ppc, we use this stuff elsewhere too. You guys need to figure out something that doesn't require phylib be built-in on ALL platforms, but only the platforms that require it. I wasn't suggesting we build it always, just not let it be built as a module. I was saying, you are requiring everyone to bloat their kernel with phylib, if they enable phylib, because of your particular platform details. That is not a path we want to follow -- limiting everyone else because of one case is not acceptable. Jeff ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] phylib: Don't allow core of phylib to build as a module
Andy Fleming wrote: I'm partial to the select-it-if-you-need-it paradigm. AFAICS this can all be solved by the platform Kconfig ensuring that phylib=y Jeff ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] phylib: Don't allow core of phylib to build as a module
The whole world isn't embedded ppc, we use this stuff elsewhere too. You guys need to figure out something that doesn't require phylib be built-in on ALL platforms, but only the platforms that require it. I wasn't suggesting we build it always, just not let it be built as a module. I was saying, you are requiring everyone to bloat their kernel with phylib, if they enable phylib, because of your particular platform details. That is not a path we want to follow -- limiting everyone else because of one case is not acceptable. Are you saying that all the driver subsystems that require being built into the kernel should be changed to not require this? (I2C, SPI, DMA engine, etc.) - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] phylib: Don't allow core of phylib to build as a module
On Jun 2, 2008, at 3:30 PM, Jeff Garzik wrote: Andy Fleming wrote: I'm partial to the select-it-if-you-need-it paradigm. AFAICS this can all be solved by the platform Kconfig ensuring that phylib=y I don't care for this as it means making sure each platform/board port gets it right. I think we'd be better off with a small stub that is always built into the kernel for phy_read/phy_write, etc or the function pointer indirection mechanism. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] phylib: Don't allow core of phylib to build as a module
Kumar Gala wrote: On Jun 2, 2008, at 3:30 PM, Jeff Garzik wrote: Andy Fleming wrote: I'm partial to the select-it-if-you-need-it paradigm. AFAICS this can all be solved by the platform Kconfig ensuring that phylib=y I don't care for this as it means making sure each platform/board port gets it right. How is this different from any other kconfig dependency? It's not too hard to scan through your platform code and see what you call... I think we'd be better off with a small stub that is always built into the kernel for phy_read/phy_write, etc or the function pointer indirection mechanism. And then instead of build failures, you'd get a silent runtime failure to apply the workaround if phylib is built as a module. -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] phylib: Don't allow core of phylib to build as a module
On Mon, Jun 2, 2008 at 5:20 PM, Scott Wood <[EMAIL PROTECTED]> wrote: > Kumar Gala wrote: >> I think we'd be better off with a small stub that is always built into the >> kernel for phy_read/phy_write, etc or the function pointer indirection >> mechanism. > > And then instead of build failures, you'd get a silent runtime failure to > apply the workaround if phylib is built as a module. Indeed; I vote for the build failure over the silent runtime failure. If a platform needs it and does not select it, then the platform is broken and it is a bug. Cheers, g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev