diff mbox series

net: ethernet: adi: requires PHYLIB support

Message ID 20240215070050.2389-1-rdunlap@infradead.org (mailing list archive)
State Accepted
Commit a9f80df4f51440303d063b55bb98720857693821
Delegated to: Netdev Maintainers
Headers show
Series net: ethernet: adi: requires PHYLIB support | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1437 this patch: 1435
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 1 maintainers not CCed: nuno.sa@analog.com
netdev/build_clang success Errors and warnings before: 1020 this patch: 1018
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 1463 this patch: 1461
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-02-16--06-00 (tests: 1443)

Commit Message

Randy Dunlap Feb. 15, 2024, 7 a.m. UTC
This driver uses functions that are supplied by the Kconfig symbol
PHYLIB, so select it to ensure that they are built as needed.

When CONFIG_ADIN1110=y and CONFIG_PHYLIB=m, there are multiple build
(linker) errors that are resolved by this Kconfig change:

   ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_net_open':
   drivers/net/ethernet/adi/adin1110.c:933: undefined reference to `phy_start'
   ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_probe_netdevs':
   drivers/net/ethernet/adi/adin1110.c:1603: undefined reference to `get_phy_device'
   ld: drivers/net/ethernet/adi/adin1110.c:1609: undefined reference to `phy_connect'
   ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_disconnect_phy':
   drivers/net/ethernet/adi/adin1110.c:1226: undefined reference to `phy_disconnect'
   ld: drivers/net/ethernet/adi/adin1110.o: in function `devm_mdiobus_alloc':
   include/linux/phy.h:455: undefined reference to `devm_mdiobus_alloc_size'
   ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_register_mdiobus':
   drivers/net/ethernet/adi/adin1110.c:529: undefined reference to `__devm_mdiobus_register'
   ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_net_stop':
   drivers/net/ethernet/adi/adin1110.c:958: undefined reference to `phy_stop'
   ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_disconnect_phy':
   drivers/net/ethernet/adi/adin1110.c:1226: undefined reference to `phy_disconnect'
   ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_adjust_link':
   drivers/net/ethernet/adi/adin1110.c:1077: undefined reference to `phy_print_status'
   ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_ioctl':
   drivers/net/ethernet/adi/adin1110.c:790: undefined reference to `phy_do_ioctl'
   ld: drivers/net/ethernet/adi/adin1110.o:(.rodata+0xf60): undefined reference to `phy_ethtool_get_link_ksettings'
   ld: drivers/net/ethernet/adi/adin1110.o:(.rodata+0xf68): undefined reference to `phy_ethtool_set_link_ksettings'

Fixes: bc93e19d088b ("net: ethernet: adi: Add ADIN1110 support")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202402070626.eZsfVHG5-lkp@intel.com/
Cc: Lennart Franzen <lennart@lfdomain.com>
Cc: Alexandru Tachici <alexandru.tachici@analog.com>
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>
Cc: netdev@vger.kernel.org
---
 drivers/net/ethernet/adi/Kconfig |    1 +
 1 file changed, 1 insertion(+)

Comments

Nuno Sá Feb. 15, 2024, 8:10 a.m. UTC | #1
On Wed, 2024-02-14 at 23:00 -0800, Randy Dunlap wrote:
> This driver uses functions that are supplied by the Kconfig symbol
> PHYLIB, so select it to ensure that they are built as needed.
> 
> When CONFIG_ADIN1110=y and CONFIG_PHYLIB=m, there are multiple build
> (linker) errors that are resolved by this Kconfig change:
> 
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_net_open':
>    drivers/net/ethernet/adi/adin1110.c:933: undefined reference to `phy_start'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_probe_netdevs':
>    drivers/net/ethernet/adi/adin1110.c:1603: undefined reference to
> `get_phy_device'
>    ld: drivers/net/ethernet/adi/adin1110.c:1609: undefined reference to
> `phy_connect'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_disconnect_phy':
>    drivers/net/ethernet/adi/adin1110.c:1226: undefined reference to
> `phy_disconnect'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `devm_mdiobus_alloc':
>    include/linux/phy.h:455: undefined reference to `devm_mdiobus_alloc_size'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function
> `adin1110_register_mdiobus':
>    drivers/net/ethernet/adi/adin1110.c:529: undefined reference to
> `__devm_mdiobus_register'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_net_stop':
>    drivers/net/ethernet/adi/adin1110.c:958: undefined reference to `phy_stop'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_disconnect_phy':
>    drivers/net/ethernet/adi/adin1110.c:1226: undefined reference to
> `phy_disconnect'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_adjust_link':
>    drivers/net/ethernet/adi/adin1110.c:1077: undefined reference to
> `phy_print_status'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_ioctl':
>    drivers/net/ethernet/adi/adin1110.c:790: undefined reference to `phy_do_ioctl'
>    ld: drivers/net/ethernet/adi/adin1110.o:(.rodata+0xf60): undefined reference to
> `phy_ethtool_get_link_ksettings'
>    ld: drivers/net/ethernet/adi/adin1110.o:(.rodata+0xf68): undefined reference to
> `phy_ethtool_set_link_ksettings'
> 
> Fixes: bc93e19d088b ("net: ethernet: adi: Add ADIN1110 support")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202402070626.eZsfVHG5-lkp@intel.com/
> Cc: Lennart Franzen <lennart@lfdomain.com>
> Cc: Alexandru Tachici <alexandru.tachici@analog.com>
> 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>
> Cc: netdev@vger.kernel.org
> ---

Reviewed-by: Nuno Sa <nuno.sa@analog.com>


>  drivers/net/ethernet/adi/Kconfig |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff -- a/drivers/net/ethernet/adi/Kconfig b/drivers/net/ethernet/adi/Kconfig
> --- a/drivers/net/ethernet/adi/Kconfig
> +++ b/drivers/net/ethernet/adi/Kconfig
> @@ -7,6 +7,7 @@ config NET_VENDOR_ADI
>  	bool "Analog Devices devices"
>  	default y
>  	depends on SPI
> +	select PHYLIB
>  	help
>  	  If you have a network (Ethernet) card belonging to this class, say Y.
>
patchwork-bot+netdevbpf@kernel.org Feb. 16, 2024, 9:50 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Wed, 14 Feb 2024 23:00:50 -0800 you wrote:
> This driver uses functions that are supplied by the Kconfig symbol
> PHYLIB, so select it to ensure that they are built as needed.
> 
> When CONFIG_ADIN1110=y and CONFIG_PHYLIB=m, there are multiple build
> (linker) errors that are resolved by this Kconfig change:
> 
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_net_open':
>    drivers/net/ethernet/adi/adin1110.c:933: undefined reference to `phy_start'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_probe_netdevs':
>    drivers/net/ethernet/adi/adin1110.c:1603: undefined reference to `get_phy_device'
>    ld: drivers/net/ethernet/adi/adin1110.c:1609: undefined reference to `phy_connect'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_disconnect_phy':
>    drivers/net/ethernet/adi/adin1110.c:1226: undefined reference to `phy_disconnect'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `devm_mdiobus_alloc':
>    include/linux/phy.h:455: undefined reference to `devm_mdiobus_alloc_size'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_register_mdiobus':
>    drivers/net/ethernet/adi/adin1110.c:529: undefined reference to `__devm_mdiobus_register'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_net_stop':
>    drivers/net/ethernet/adi/adin1110.c:958: undefined reference to `phy_stop'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_disconnect_phy':
>    drivers/net/ethernet/adi/adin1110.c:1226: undefined reference to `phy_disconnect'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_adjust_link':
>    drivers/net/ethernet/adi/adin1110.c:1077: undefined reference to `phy_print_status'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_ioctl':
>    drivers/net/ethernet/adi/adin1110.c:790: undefined reference to `phy_do_ioctl'
>    ld: drivers/net/ethernet/adi/adin1110.o:(.rodata+0xf60): undefined reference to `phy_ethtool_get_link_ksettings'
>    ld: drivers/net/ethernet/adi/adin1110.o:(.rodata+0xf68): undefined reference to `phy_ethtool_set_link_ksettings'
> 
> [...]

Here is the summary with links:
  - net: ethernet: adi: requires PHYLIB support
    https://git.kernel.org/netdev/net/c/a9f80df4f514

You are awesome, thank you!
Michal Kubecek Feb. 26, 2024, 6:44 a.m. UTC | #3
On Wed, Feb 14, 2024 at 11:00:50PM -0800, Randy Dunlap wrote:
> This driver uses functions that are supplied by the Kconfig symbol
> PHYLIB, so select it to ensure that they are built as needed.
> 
> When CONFIG_ADIN1110=y and CONFIG_PHYLIB=m, there are multiple build
> (linker) errors that are resolved by this Kconfig change:
> 
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_net_open':
>    drivers/net/ethernet/adi/adin1110.c:933: undefined reference to `phy_start'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_probe_netdevs':
>    drivers/net/ethernet/adi/adin1110.c:1603: undefined reference to `get_phy_device'
>    ld: drivers/net/ethernet/adi/adin1110.c:1609: undefined reference to `phy_connect'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_disconnect_phy':
>    drivers/net/ethernet/adi/adin1110.c:1226: undefined reference to `phy_disconnect'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `devm_mdiobus_alloc':
>    include/linux/phy.h:455: undefined reference to `devm_mdiobus_alloc_size'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_register_mdiobus':
>    drivers/net/ethernet/adi/adin1110.c:529: undefined reference to `__devm_mdiobus_register'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_net_stop':
>    drivers/net/ethernet/adi/adin1110.c:958: undefined reference to `phy_stop'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_disconnect_phy':
>    drivers/net/ethernet/adi/adin1110.c:1226: undefined reference to `phy_disconnect'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_adjust_link':
>    drivers/net/ethernet/adi/adin1110.c:1077: undefined reference to `phy_print_status'
>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_ioctl':
>    drivers/net/ethernet/adi/adin1110.c:790: undefined reference to `phy_do_ioctl'
>    ld: drivers/net/ethernet/adi/adin1110.o:(.rodata+0xf60): undefined reference to `phy_ethtool_get_link_ksettings'
>    ld: drivers/net/ethernet/adi/adin1110.o:(.rodata+0xf68): undefined reference to `phy_ethtool_set_link_ksettings'
> 
> Fixes: bc93e19d088b ("net: ethernet: adi: Add ADIN1110 support")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202402070626.eZsfVHG5-lkp@intel.com/
> Cc: Lennart Franzen <lennart@lfdomain.com>
> Cc: Alexandru Tachici <alexandru.tachici@analog.com>
> 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>
> Cc: netdev@vger.kernel.org
> ---
>  drivers/net/ethernet/adi/Kconfig |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff -- a/drivers/net/ethernet/adi/Kconfig b/drivers/net/ethernet/adi/Kconfig
> --- a/drivers/net/ethernet/adi/Kconfig
> +++ b/drivers/net/ethernet/adi/Kconfig
> @@ -7,6 +7,7 @@ config NET_VENDOR_ADI
>  	bool "Analog Devices devices"
>  	default y
>  	depends on SPI
> +	select PHYLIB
>  	help
>  	  If you have a network (Ethernet) card belonging to this class, say Y.

Shouldn't the "select PHYLIB" be added to ADIN1110 rather than
NET_VENDOR_ADI? Now with v6.8-rc6, PHYLIB and few other options are
forced to "Y" whenever NET_VENDOR_ADI is enabled (even with ADIN1110
disabled).

Michal
Randy Dunlap Feb. 26, 2024, 6:50 a.m. UTC | #4
Hi,

On 2/25/24 22:44, Michal Kubecek wrote:
> On Wed, Feb 14, 2024 at 11:00:50PM -0800, Randy Dunlap wrote:
>> This driver uses functions that are supplied by the Kconfig symbol
>> PHYLIB, so select it to ensure that they are built as needed.
>>
>> When CONFIG_ADIN1110=y and CONFIG_PHYLIB=m, there are multiple build
>> (linker) errors that are resolved by this Kconfig change:
>>
>>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_net_open':
>>    drivers/net/ethernet/adi/adin1110.c:933: undefined reference to `phy_start'
>>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_probe_netdevs':
>>    drivers/net/ethernet/adi/adin1110.c:1603: undefined reference to `get_phy_device'
>>    ld: drivers/net/ethernet/adi/adin1110.c:1609: undefined reference to `phy_connect'
>>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_disconnect_phy':
>>    drivers/net/ethernet/adi/adin1110.c:1226: undefined reference to `phy_disconnect'
>>    ld: drivers/net/ethernet/adi/adin1110.o: in function `devm_mdiobus_alloc':
>>    include/linux/phy.h:455: undefined reference to `devm_mdiobus_alloc_size'
>>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_register_mdiobus':
>>    drivers/net/ethernet/adi/adin1110.c:529: undefined reference to `__devm_mdiobus_register'
>>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_net_stop':
>>    drivers/net/ethernet/adi/adin1110.c:958: undefined reference to `phy_stop'
>>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_disconnect_phy':
>>    drivers/net/ethernet/adi/adin1110.c:1226: undefined reference to `phy_disconnect'
>>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_adjust_link':
>>    drivers/net/ethernet/adi/adin1110.c:1077: undefined reference to `phy_print_status'
>>    ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_ioctl':
>>    drivers/net/ethernet/adi/adin1110.c:790: undefined reference to `phy_do_ioctl'
>>    ld: drivers/net/ethernet/adi/adin1110.o:(.rodata+0xf60): undefined reference to `phy_ethtool_get_link_ksettings'
>>    ld: drivers/net/ethernet/adi/adin1110.o:(.rodata+0xf68): undefined reference to `phy_ethtool_set_link_ksettings'
>>
>> Fixes: bc93e19d088b ("net: ethernet: adi: Add ADIN1110 support")
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202402070626.eZsfVHG5-lkp@intel.com/
>> Cc: Lennart Franzen <lennart@lfdomain.com>
>> Cc: Alexandru Tachici <alexandru.tachici@analog.com>
>> 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>
>> Cc: netdev@vger.kernel.org
>> ---
>>  drivers/net/ethernet/adi/Kconfig |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff -- a/drivers/net/ethernet/adi/Kconfig b/drivers/net/ethernet/adi/Kconfig
>> --- a/drivers/net/ethernet/adi/Kconfig
>> +++ b/drivers/net/ethernet/adi/Kconfig
>> @@ -7,6 +7,7 @@ config NET_VENDOR_ADI
>>  	bool "Analog Devices devices"
>>  	default y
>>  	depends on SPI
>> +	select PHYLIB
>>  	help
>>  	  If you have a network (Ethernet) card belonging to this class, say Y.
> 
> Shouldn't the "select PHYLIB" be added to ADIN1110 rather than
> NET_VENDOR_ADI? Now with v6.8-rc6, PHYLIB and few other options are
> forced to "Y" whenever NET_VENDOR_ADI is enabled (even with ADIN1110
> disabled).

ugh, I believe that you are correct.
I'll send a corrected patch.

Thanks.
diff mbox series

Patch

diff -- a/drivers/net/ethernet/adi/Kconfig b/drivers/net/ethernet/adi/Kconfig
--- a/drivers/net/ethernet/adi/Kconfig
+++ b/drivers/net/ethernet/adi/Kconfig
@@ -7,6 +7,7 @@  config NET_VENDOR_ADI
 	bool "Analog Devices devices"
 	default y
 	depends on SPI
+	select PHYLIB
 	help
 	  If you have a network (Ethernet) card belonging to this class, say Y.