* [PATCH v2 net-next] net: wangxun: fix VF drivers Kconfig dependencies and help text
@ 2025-07-12 5:58 Randy Dunlap
2025-07-12 15:30 ` Simon Horman
0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2025-07-12 5:58 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Jiawen Wu, Mengyuan Lou, netdev, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
On x86_64, when CONFIG_PTP_1588_CLOCK_OPTIONAL=m,
CONFIG_LIBWX can be set to 'y' by either of TXGBEVF=y or NGBEVF=y,
causing kconfig unmet direct dependencies warning messages:
WARNING: unmet direct dependencies detected for LIBWX
Depends on [m]: NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_WANGXUN [=y] && PTP_1588_CLOCK_OPTIONAL [=m]
Selected by [y]:
- TXGBEVF [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_WANGXUN [=y] && PCI [=y] && PCI_MSI [=y]
- NGBEVF [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_WANGXUN [=y] && PCI_MSI [=y]
and subsequent build errors:
ld: vmlinux.o: in function `wx_clean_tx_irq':
drivers/net/ethernet/wangxun/libwx/wx_lib.c:757:(.text+0xa48f18): undefined reference to `ptp_schedule_worker'
ld: vmlinux.o: in function `wx_get_ts_info':
drivers/net/ethernet/wangxun/libwx/wx_ethtool.c:509:(.text+0xa4a58c): undefined reference to `ptp_clock_index'
ld: vmlinux.o: in function `wx_ptp_stop':
drivers/net/ethernet/wangxun/libwx/wx_ptp.c:838:(.text+0xa4b3dc): undefined reference to `ptp_clock_unregister'
ld: vmlinux.o: in function `wx_ptp_reset':
drivers/net/ethernet/wangxun/libwx/wx_ptp.c:769:(.text+0xa4b80c): undefined reference to `ptp_schedule_worker'
ld: vmlinux.o: in function `wx_ptp_create_clock':
drivers/net/ethernet/wangxun/libwx/wx_ptp.c:532:(.text+0xa4b9d1): undefined reference to `ptp_clock_register'
Add dependency to PTP_1588_CLOCK_OPTIONAL for both txgbevf and ngbevf.
This is needed since both of them select LIBWX and it depends on
PTP_1588_CLOCK_OPTIONAL.
Drop "depends on PCI" for TXGBEVF since PCI_MSI implies that.
Drop "select PHYLINK" for TXGBEVF since the driver does not use phylink.
Move the driver name help text to the module name help text for
both drivers.
Fixes: 377d180bd71c ("net: wangxun: add txgbevf build")
Fixes: a0008a3658a3 ("net: wangxun: add ngbevf build")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jiawen Wu <jiawenwu@trustnetic.com>
Cc: Mengyuan Lou <mengyuanlou@net-swift.com>
Cc: netdev@vger.kernel.org
Cc: Andrew Lunn <andrew+netdev@lunn.ch>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
---
v2: also drop PHYLINK for TXGBEVF, suggested by Jiawen Wu
drivers/net/ethernet/wangxun/Kconfig | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
--- linux-next-20250710.orig/drivers/net/ethernet/wangxun/Kconfig
+++ linux-next-20250710/drivers/net/ethernet/wangxun/Kconfig
@@ -66,35 +66,33 @@ config TXGBE
config TXGBEVF
tristate "Wangxun(R) 10/25/40G Virtual Function Ethernet support"
- depends on PCI
depends on PCI_MSI
+ depends on PTP_1588_CLOCK_OPTIONAL
select LIBWX
- select PHYLINK
help
This driver supports virtual functions for SP1000A, WX1820AL,
WX5XXX, WX5XXXAL.
- This driver was formerly named txgbevf.
-
More specific information on configuring the driver is in
<file:Documentation/networking/device_drivers/ethernet/wangxun/txgbevf.rst>.
- To compile this driver as a module, choose M here. MSI-X interrupt
- support is required for this driver to work correctly.
+ To compile this driver as a module, choose M here. The module
+ will be called txgbevf. MSI-X interrupt support is required
+ for this driver to work correctly.
config NGBEVF
tristate "Wangxun(R) GbE Virtual Function Ethernet support"
depends on PCI_MSI
+ depends on PTP_1588_CLOCK_OPTIONAL
select LIBWX
help
This driver supports virtual functions for WX1860, WX1860AL.
- This driver was formerly named ngbevf.
-
More specific information on configuring the driver is in
<file:Documentation/networking/device_drivers/ethernet/wangxun/ngbevf.rst>.
- To compile this driver as a module, choose M here. MSI-X interrupt
- support is required for this driver to work correctly.
+ To compile this driver as a module, choose M here. The module
+ will be called ngbefv. MSI-X interrupt support is required for
+ this driver to work correctly.
endif # NET_VENDOR_WANGXUN
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 net-next] net: wangxun: fix VF drivers Kconfig dependencies and help text
2025-07-12 5:58 [PATCH v2 net-next] net: wangxun: fix VF drivers Kconfig dependencies and help text Randy Dunlap
@ 2025-07-12 15:30 ` Simon Horman
2025-07-14 7:32 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Simon Horman @ 2025-07-12 15:30 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, Jiawen Wu, Mengyuan Lou, netdev, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Arnd Bergmann
+ Arnd
On Fri, Jul 11, 2025 at 10:58:56PM -0700, Randy Dunlap wrote:
> On x86_64, when CONFIG_PTP_1588_CLOCK_OPTIONAL=m,
> CONFIG_LIBWX can be set to 'y' by either of TXGBEVF=y or NGBEVF=y,
> causing kconfig unmet direct dependencies warning messages:
>
> WARNING: unmet direct dependencies detected for LIBWX
> Depends on [m]: NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_WANGXUN [=y] && PTP_1588_CLOCK_OPTIONAL [=m]
> Selected by [y]:
> - TXGBEVF [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_WANGXUN [=y] && PCI [=y] && PCI_MSI [=y]
> - NGBEVF [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_WANGXUN [=y] && PCI_MSI [=y]
>
> and subsequent build errors:
>
> ld: vmlinux.o: in function `wx_clean_tx_irq':
> drivers/net/ethernet/wangxun/libwx/wx_lib.c:757:(.text+0xa48f18): undefined reference to `ptp_schedule_worker'
> ld: vmlinux.o: in function `wx_get_ts_info':
> drivers/net/ethernet/wangxun/libwx/wx_ethtool.c:509:(.text+0xa4a58c): undefined reference to `ptp_clock_index'
> ld: vmlinux.o: in function `wx_ptp_stop':
> drivers/net/ethernet/wangxun/libwx/wx_ptp.c:838:(.text+0xa4b3dc): undefined reference to `ptp_clock_unregister'
> ld: vmlinux.o: in function `wx_ptp_reset':
> drivers/net/ethernet/wangxun/libwx/wx_ptp.c:769:(.text+0xa4b80c): undefined reference to `ptp_schedule_worker'
> ld: vmlinux.o: in function `wx_ptp_create_clock':
> drivers/net/ethernet/wangxun/libwx/wx_ptp.c:532:(.text+0xa4b9d1): undefined reference to `ptp_clock_register'
>
> Add dependency to PTP_1588_CLOCK_OPTIONAL for both txgbevf and ngbevf.
> This is needed since both of them select LIBWX and it depends on
> PTP_1588_CLOCK_OPTIONAL.
>
> Drop "depends on PCI" for TXGBEVF since PCI_MSI implies that.
> Drop "select PHYLINK" for TXGBEVF since the driver does not use phylink.
>
> Move the driver name help text to the module name help text for
> both drivers.
>
> Fixes: 377d180bd71c ("net: wangxun: add txgbevf build")
> Fixes: a0008a3658a3 ("net: wangxun: add ngbevf build")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Jiawen Wu <jiawenwu@trustnetic.com>
> Cc: Mengyuan Lou <mengyuanlou@net-swift.com>
> Cc: netdev@vger.kernel.org
> Cc: Andrew Lunn <andrew+netdev@lunn.ch>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Paolo Abeni <pabeni@redhat.com>
> ---
> v2: also drop PHYLINK for TXGBEVF, suggested by Jiawen Wu
Reviewed-by: Simon Horman <horms@kernel.org>
Arnd (CCed) has also posted a patch [1] for the unmet dependencies / build
errors portion of this patch. My 2c worth would be to take Arnd's patch and
for Randy then follow-up with an updated version of his patch with the
extra bits in it. But I don't feel strongly about this.
1. [PATCH] net: wangxun: fix LIBWX dependencies again
https://lore.kernel.org/all/20250711082339.1372821-1-arnd@kernel.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 net-next] net: wangxun: fix VF drivers Kconfig dependencies and help text
2025-07-12 15:30 ` Simon Horman
@ 2025-07-14 7:32 ` Arnd Bergmann
0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2025-07-14 7:32 UTC (permalink / raw)
To: Simon Horman, Randy Dunlap
Cc: linux-kernel, Jiawen Wu, Mengyuan Lou, Netdev, Andrew Lunn,
David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
On Sat, Jul 12, 2025, at 17:30, Simon Horman wrote:
>> v2: also drop PHYLINK for TXGBEVF, suggested by Jiawen Wu
>
> Reviewed-by: Simon Horman <horms@kernel.org>
>
> Arnd (CCed) has also posted a patch [1] for the unmet dependencies / build
> errors portion of this patch. My 2c worth would be to take Arnd's patch and
> for Randy then follow-up with an updated version of his patch with the
> extra bits in it. But I don't feel strongly about this.
Sounds fine to me. I think we need another patch for the PHYLINK
dependency, as the current version in linux-next breaks with LIBWX=y
in combination with PHYLINK=m:
wx_ethtool.c:(.text+0xb40): undefined reference to `phylink_ethtool_ksettings_get'
/home/arnd/cross/arm64/gcc-12.5.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ld: drivers/net/ethernet/wangxun/libwx/wx_ethtool.o: in function `wx_set_link_ksettings':
wx_ethtool.c:(.text+0xb9c): undefined reference to `phylink_ethtool_ksettings_set'
/home/arnd/cross/arm64/gcc-12.5.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ld: drivers/net/ethernet/wangxun/libwx/wx_ethtool.o: in function `wx_set_pauseparam':
wx_ethtool.c:(.text+0xc10): undefined reference to `phylink_ethtool_set_pauseparam'
/home/arnd/cross/arm64/gcc-12.5.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ld: drivers/net/ethernet/wangxun/libwx/wx_ethtool.o: in function `wx_get_pauseparam':
Randy's patch removes one 'select PHYLINK', which would make that
configuration slightly more likely to happen. The easiest workaround
would probably be
--- a/drivers/net/ethernet/wangxun/Kconfig
+++ b/drivers/net/ethernet/wangxun/Kconfig
@@ -20,6 +20,7 @@ config LIBWX
tristate
depends on PTP_1588_CLOCK_OPTIONAL
select PAGE_POOL
+ select PHYLINK
help
Common library for Wangxun(R) Ethernet drivers.
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-14 7:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-12 5:58 [PATCH v2 net-next] net: wangxun: fix VF drivers Kconfig dependencies and help text Randy Dunlap
2025-07-12 15:30 ` Simon Horman
2025-07-14 7:32 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®