lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <BF15FEBB-4876-4B16-915B-1D21BF989DA8@kernel.crashing.org>
Date:	Mon, 2 Jun 2008 14:30:19 -0500
From:	Kumar Gala <galak@...nel.crashing.org>
To:	Jeff Garzik <jeff@...zik.org>
Cc:	netdev@...r.kernel.org, linuxppc-dev@...abs.org,
	Andy Fleming <afleming@...escale.com>
Subject: 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 <galak@...nel.crashing.org>
>>>> ---
>>>> 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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ