2014-12-10 16:10:50

by Jim Davis

[permalink] [raw]
Subject: randconfig build error with next-20141210, in drivers/net/ethernet/broadcom/genet

Building with the attached random configuration file,

ERROR: "fixed_phy_register"
[drivers/net/ethernet/broadcom/genet/genet.ko] undefined!


Attachments:
randconfig-1418224422.txt (99.57 kB)

2014-12-11 19:22:25

by David Miller

[permalink] [raw]
Subject: Re: randconfig build error with next-20141210, in drivers/net/ethernet/broadcom/genet

From: Jim Davis <[email protected]>
Date: Wed, 10 Dec 2014 09:10:45 -0700

> Building with the attached random configuration file,
>
> ERROR: "fixed_phy_register"
> [drivers/net/ethernet/broadcom/genet/genet.ko] undefined!

Florian, I don't understand why FIXED_PHY is only selected in Kconfig
if the driver is statically built into the kernel.

That makes no sense at all, you should need that module regardless of
how the driver itself is enabled.

Can't we just remove the "XXX=y" in all of those silly:

select FIXED_PHY if XXX=y

expressions?

There are three such cases right now:

drivers/net/dsa/Kconfig: select FIXED_PHY if NET_DSA_BCM_SF2=y
drivers/net/ethernet/broadcom/Kconfig: select FIXED_PHY if BCMGENET=y
drivers/net/ethernet/broadcom/Kconfig: select FIXED_PHY if SYSTEMPORT=y

2014-12-12 05:09:07

by Florian Fainelli

[permalink] [raw]
Subject: Re: randconfig build error with next-20141210, in drivers/net/ethernet/broadcom/genet

Le 11/12/2014 11:22, David Miller a ?crit :
> From: Jim Davis <[email protected]> Date: Wed, 10 Dec 2014
> 09:10:45 -0700
>
>> Building with the attached random configuration file,
>>
>> ERROR: "fixed_phy_register"
>> [drivers/net/ethernet/broadcom/genet/genet.ko] undefined!
>
> Florian, I don't understand why FIXED_PHY is only selected in
> Kconfig if the driver is statically built into the kernel.
>
> That makes no sense at all, you should need that module regardless
> of how the driver itself is enabled.

AFAIR this was introduced to silence a warning you reported:

"I think you need to work on the Kconfig dependencies a little bit more.
I have BCMGENET specified as modular, which absolutely should work. Yet
Kconfig complains.

warning: (BCMGENET) selects FIXED_PHY which has unmet direct
dependencies (NETDEVICES && PHYLIB=y)"

but I agree, this makes no sense, we should select FIXED_PHY
unconditionnally, will send you patches tomorrow to fix that.

>
> Can't we just remove the "XXX=y" in all of those silly:
>
> select FIXED_PHY if XXX=y
>
> expressions?
>
> There are three such cases right now:
>
> drivers/net/dsa/Kconfig: select FIXED_PHY if NET_DSA_BCM_SF2=y
> drivers/net/ethernet/broadcom/Kconfig: select FIXED_PHY if
> BCMGENET=y drivers/net/ethernet/broadcom/Kconfig: select FIXED_PHY
> if SYSTEMPORT=y
>


--
Florian

2014-12-12 16:02:30

by David Miller

[permalink] [raw]
Subject: Re: randconfig build error with next-20141210, in drivers/net/ethernet/broadcom/genet

From: Florian Fainelli <[email protected]>
Date: Thu, 11 Dec 2014 21:09:01 -0800

> Le 11/12/2014 11:22, David Miller a ?crit :
>> From: Jim Davis <[email protected]> Date: Wed, 10 Dec 2014
>> 09:10:45 -0700
>>
>>> Building with the attached random configuration file,
>>>
>>> ERROR: "fixed_phy_register"
>>> [drivers/net/ethernet/broadcom/genet/genet.ko] undefined!
>>
>> Florian, I don't understand why FIXED_PHY is only selected in
>> Kconfig if the driver is statically built into the kernel.
>>
>> That makes no sense at all, you should need that module regardless
>> of how the driver itself is enabled.
>
> AFAIR this was introduced to silence a warning you reported:
>
> "I think you need to work on the Kconfig dependencies a little bit more.
> I have BCMGENET specified as modular, which absolutely should work. Yet
> Kconfig complains.
>
> warning: (BCMGENET) selects FIXED_PHY which has unmet direct
> dependencies (NETDEVICES && PHYLIB=y)"
>
> but I agree, this makes no sense, we should select FIXED_PHY
> unconditionnally, will send you patches tomorrow to fix that.

What's really perplexing is that FIXED_PHY is only enable'able
when PHYLIB=y. I think that's the core of the problems here.

All of these drivers shouldn't lose fixed phy support simply
because they, or PHYLIB itself, is built modular.