diff mbox series

[net] net: dsa: ocelot: add dependency for NET_DSA_MSCC_FELIX

Message ID 20191119025128.7393-1-maowenan@huawei.com
State Changes Requested
Delegated to: David Miller
Headers show
Series [net] net: dsa: ocelot: add dependency for NET_DSA_MSCC_FELIX | expand

Commit Message

maowenan Nov. 19, 2019, 2:51 a.m. UTC
If CONFIG_NET_DSA_MSCC_FELIX=y, and CONFIG_NET_VENDOR_MICROSEMI=n,
below errors can be found:
drivers/net/dsa/ocelot/felix.o: In function `felix_vlan_del':
felix.c:(.text+0x26e): undefined reference to `ocelot_vlan_del'
drivers/net/dsa/ocelot/felix.o: In function `felix_vlan_add':
felix.c:(.text+0x352): undefined reference to `ocelot_vlan_add'

and warning as below:
WARNING: unmet direct dependencies detected for MSCC_OCELOT_SWITCH
Depends on [n]: NETDEVICES [=y] && ETHERNET [=y] &&
NET_VENDOR_MICROSEMI [=n] && NET_SWITCHDEV [=y] && HAS_IOMEM [=y]
Selected by [y]:
NET_DSA_MSCC_FELIX [=y] && NETDEVICES [=y] && HAVE_NET_DSA [=y]
&& NET_DSA [=y] && PCI [=y]

This patch add dependency NET_VENDOR_MICROSEMI for NET_DSA_MSCC_FELIX.

Fixes: 56051948773e ("net: dsa: ocelot: add driver for Felix switch family")
Signed-off-by: Mao Wenan <maowenan@huawei.com>
---
 drivers/net/dsa/ocelot/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller Nov. 19, 2019, 11:41 p.m. UTC | #1
From: Mao Wenan <maowenan@huawei.com>
Date: Tue, 19 Nov 2019 10:51:28 +0800

> If CONFIG_NET_DSA_MSCC_FELIX=y, and CONFIG_NET_VENDOR_MICROSEMI=n,
> below errors can be found:
> drivers/net/dsa/ocelot/felix.o: In function `felix_vlan_del':
> felix.c:(.text+0x26e): undefined reference to `ocelot_vlan_del'
> drivers/net/dsa/ocelot/felix.o: In function `felix_vlan_add':
> felix.c:(.text+0x352): undefined reference to `ocelot_vlan_add'
> 
> and warning as below:
> WARNING: unmet direct dependencies detected for MSCC_OCELOT_SWITCH
> Depends on [n]: NETDEVICES [=y] && ETHERNET [=y] &&
> NET_VENDOR_MICROSEMI [=n] && NET_SWITCHDEV [=y] && HAS_IOMEM [=y]
> Selected by [y]:
> NET_DSA_MSCC_FELIX [=y] && NETDEVICES [=y] && HAVE_NET_DSA [=y]
> && NET_DSA [=y] && PCI [=y]
> 
> This patch add dependency NET_VENDOR_MICROSEMI for NET_DSA_MSCC_FELIX.
> 
> Fixes: 56051948773e ("net: dsa: ocelot: add driver for Felix switch family")
> Signed-off-by: Mao Wenan <maowenan@huawei.com>

This seems more like a "select" situation, why in the world should the
user be required to know about NET_VENDOR_MISCROSEMI at all for this
driver?

And NET_VENDOR_MICROSEMI does _NOT_ enable any code at all, you have
to enable the individual drivers guarded by NET_VENDOR_MICROSEMI in order
to resolve the symbols necessary for ocelot.

I'm not applying this, it isn't correct.

Thank you.
maowenan Nov. 20, 2019, 1:27 a.m. UTC | #2
在 2019/11/20 7:41, David Miller 写道:
> From: Mao Wenan <maowenan@huawei.com>
> Date: Tue, 19 Nov 2019 10:51:28 +0800
> 
>> If CONFIG_NET_DSA_MSCC_FELIX=y, and CONFIG_NET_VENDOR_MICROSEMI=n,
>> below errors can be found:
>> drivers/net/dsa/ocelot/felix.o: In function `felix_vlan_del':
>> felix.c:(.text+0x26e): undefined reference to `ocelot_vlan_del'
>> drivers/net/dsa/ocelot/felix.o: In function `felix_vlan_add':
>> felix.c:(.text+0x352): undefined reference to `ocelot_vlan_add'
>>
>> and warning as below:
>> WARNING: unmet direct dependencies detected for MSCC_OCELOT_SWITCH
>> Depends on [n]: NETDEVICES [=y] && ETHERNET [=y] &&
>> NET_VENDOR_MICROSEMI [=n] && NET_SWITCHDEV [=y] && HAS_IOMEM [=y]
>> Selected by [y]:
>> NET_DSA_MSCC_FELIX [=y] && NETDEVICES [=y] && HAVE_NET_DSA [=y]
>> && NET_DSA [=y] && PCI [=y]
>>
>> This patch add dependency NET_VENDOR_MICROSEMI for NET_DSA_MSCC_FELIX.
>>
>> Fixes: 56051948773e ("net: dsa: ocelot: add driver for Felix switch family")
>> Signed-off-by: Mao Wenan <maowenan@huawei.com>
> 
> This seems more like a "select" situation, why in the world should the
> user be required to know about NET_VENDOR_MISCROSEMI at all for this
> driver?
thanks.
I will change to 'select' it and send v2.
> 
> And NET_VENDOR_MICROSEMI does _NOT_ enable any code at all, you have
> to enable the individual drivers guarded by NET_VENDOR_MICROSEMI in order
> to resolve the symbols necessary for ocelot.
> 
> I'm not applying this, it isn't correct.
> 
> Thank you.
> 
> .
>
diff mbox series

Patch

diff --git a/drivers/net/dsa/ocelot/Kconfig b/drivers/net/dsa/ocelot/Kconfig
index 0031ca8..61c4ce7 100644
--- a/drivers/net/dsa/ocelot/Kconfig
+++ b/drivers/net/dsa/ocelot/Kconfig
@@ -1,7 +1,7 @@ 
 # SPDX-License-Identifier: GPL-2.0-only
 config NET_DSA_MSCC_FELIX
 	tristate "Ocelot / Felix Ethernet switch support"
-	depends on NET_DSA && PCI
+	depends on NET_DSA && PCI && NET_VENDOR_MICROSEMI
 	select MSCC_OCELOT_SWITCH
 	select NET_DSA_TAG_OCELOT
 	help