[PATCH] phy: export phy_mii_ioctl

Jon Smirl jonsmirl at gmail.com
Wed Sep 19 05:17:37 EST 2007


On 9/18/07, Domen Puncer <domen at coderock.org> wrote:
> More testing and getting it to work properly on Phytec pcm030 would
> be great.

I compiled it as a module:
  CC [M]  drivers/net/fec_mpc52xx/fec.o
drivers/net/fec_mpc52xx/fec.c:613: warning: 'mpc52xx_fec_mac_setup'
defined but not used

This code needs to be enclosed in "#ifndef MODULE". But why aren't you
using module_param() to make a string parameter and then copy it into
mpc52xx_fec_mac_addr[] if the parameter is not null?

If it is a module param you need to use
fec_mpc52xx_phy.mpc52xx-mac="xxxx" instead of just mpc52xx-mac. The
way it is not you can't use mpc52xx-mac when built as a module.

static int __init mpc52xx_fec_mac_setup(char *mac_address)
{
        int i;
        u64 val64;

        val64 = simple_strtoull(mac_address, NULL, 16);

        for (i = 0; i < 6; i++)
                mpc52xx_fec_mac_addr[5-i] = val64 >> (i*8);

        return 0;
}

__setup("mpc52xx-mac=", mpc52xx_fec_mac_setup);



-- 
Jon Smirl
jonsmirl at gmail.com


More information about the Linuxppc-embedded mailing list