linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] enetc: auto select PHYLIB and MDIO_DEVRES
@ 2021-02-11 16:09 Tong Zhang
  2021-02-11 17:38 ` Florian Fainelli
  0 siblings, 1 reply; 5+ messages in thread
From: Tong Zhang @ 2021-02-11 16:09 UTC (permalink / raw)
  To: Claudiu Manoil, David S. Miller, Jakub Kicinski, netdev, linux-kernel
  Cc: ztong0001

FSL_ENETC_MDIO use symbols from PHYLIB and MDIO_DEVRES, however they are
not auto selected.

ERROR: modpost: "__mdiobus_register" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
ERROR: modpost: "mdiobus_unregister" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
ERROR: modpost: "devm_mdiobus_alloc_size" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!

auto select MDIO_DEVRES and PHYLIB when FSL_ENETC_MDIO is selected.

Signed-off-by: Tong Zhang <ztong0001@gmail.com>
---
 drivers/net/ethernet/freescale/enetc/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/freescale/enetc/Kconfig b/drivers/net/ethernet/freescale/enetc/Kconfig
index d99ea0f4e4a6..2ec3f8065e6d 100644
--- a/drivers/net/ethernet/freescale/enetc/Kconfig
+++ b/drivers/net/ethernet/freescale/enetc/Kconfig
@@ -28,6 +28,8 @@ config FSL_ENETC_VF
 config FSL_ENETC_MDIO
 	tristate "ENETC MDIO driver"
 	depends on PCI
+	select MDIO_DEVRES
+	select PHYLIB
 	help
 	  This driver supports NXP ENETC Central MDIO controller as a PCIe
 	  physical function (PF) device.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] enetc: auto select PHYLIB and MDIO_DEVRES
  2021-02-11 16:09 [PATCH] enetc: auto select PHYLIB and MDIO_DEVRES Tong Zhang
@ 2021-02-11 17:38 ` Florian Fainelli
  2021-02-11 17:54   ` [PATCH v2] " Tong Zhang
  2021-02-11 17:54   ` [PATCH] " Tong Zhang
  0 siblings, 2 replies; 5+ messages in thread
From: Florian Fainelli @ 2021-02-11 17:38 UTC (permalink / raw)
  To: Tong Zhang, Claudiu Manoil, David S. Miller, Jakub Kicinski,
	netdev, linux-kernel

On 2/11/21 8:09 AM, Tong Zhang wrote:
> FSL_ENETC_MDIO use symbols from PHYLIB and MDIO_DEVRES, however they are
> not auto selected.
> 
> ERROR: modpost: "__mdiobus_register" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
> ERROR: modpost: "mdiobus_unregister" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
> ERROR: modpost: "devm_mdiobus_alloc_size" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
> 
> auto select MDIO_DEVRES and PHYLIB when FSL_ENETC_MDIO is selected.

depends on MDIO_DEVRES && MDIO_BUS

would be more appropriate because the symbols you reference are part of
the MDIO bus layer, which happens to associated with PHYLIB depending on
the configuration but as far as build goes you can separate the two.
-- 
Florian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] enetc: auto select PHYLIB and MDIO_DEVRES
  2021-02-11 17:38 ` Florian Fainelli
@ 2021-02-11 17:54   ` Tong Zhang
  2021-02-12  2:20     ` patchwork-bot+netdevbpf
  2021-02-11 17:54   ` [PATCH] " Tong Zhang
  1 sibling, 1 reply; 5+ messages in thread
From: Tong Zhang @ 2021-02-11 17:54 UTC (permalink / raw)
  To: Claudiu Manoil, David S. Miller, Jakub Kicinski, netdev, linux-kernel
  Cc: ztong0001

FSL_ENETC_MDIO use symbols from PHYLIB (MDIO_BUS) and MDIO_DEVRES,
however there are no dependency specified in Kconfig

ERROR: modpost: "__mdiobus_register" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
ERROR: modpost: "mdiobus_unregister" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
ERROR: modpost: "devm_mdiobus_alloc_size" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!

add depends on MDIO_DEVRES && MDIO_BUS

Signed-off-by: Tong Zhang <ztong0001@gmail.com>
---
v2:change to depends on MDIO_DEVRES&& MDIO_BUS as suggested by Florian Fainelli <f.fainelli@gmail.com>>

 drivers/net/ethernet/freescale/enetc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/enetc/Kconfig b/drivers/net/ethernet/freescale/enetc/Kconfig
index d99ea0f4e4a6..ab92382c399a 100644
--- a/drivers/net/ethernet/freescale/enetc/Kconfig
+++ b/drivers/net/ethernet/freescale/enetc/Kconfig
@@ -27,7 +27,7 @@ config FSL_ENETC_VF
 
 config FSL_ENETC_MDIO
 	tristate "ENETC MDIO driver"
-	depends on PCI
+	depends on PCI && MDIO_DEVRES && MDIO_BUS
 	help
 	  This driver supports NXP ENETC Central MDIO controller as a PCIe
 	  physical function (PF) device.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] enetc: auto select PHYLIB and MDIO_DEVRES
  2021-02-11 17:38 ` Florian Fainelli
  2021-02-11 17:54   ` [PATCH v2] " Tong Zhang
@ 2021-02-11 17:54   ` Tong Zhang
  1 sibling, 0 replies; 5+ messages in thread
From: Tong Zhang @ 2021-02-11 17:54 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Claudiu Manoil, David S. Miller, Jakub Kicinski, netdev, open list

Thanks for the comments!
I have sent a revised patch.
- Tong

On Thu, Feb 11, 2021 at 12:38 PM Florian Fainelli <f.fainelli@gmail.com> wrote:
>
> On 2/11/21 8:09 AM, Tong Zhang wrote:
> > FSL_ENETC_MDIO use symbols from PHYLIB and MDIO_DEVRES, however they are
> > not auto selected.
> >
> > ERROR: modpost: "__mdiobus_register" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
> > ERROR: modpost: "mdiobus_unregister" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
> > ERROR: modpost: "devm_mdiobus_alloc_size" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
> >
> > auto select MDIO_DEVRES and PHYLIB when FSL_ENETC_MDIO is selected.
>
> depends on MDIO_DEVRES && MDIO_BUS
>
> would be more appropriate because the symbols you reference are part of
> the MDIO bus layer, which happens to associated with PHYLIB depending on
> the configuration but as far as build goes you can separate the two.
> --
> Florian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] enetc: auto select PHYLIB and MDIO_DEVRES
  2021-02-11 17:54   ` [PATCH v2] " Tong Zhang
@ 2021-02-12  2:20     ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-02-12  2:20 UTC (permalink / raw)
  To: Tong Zhang; +Cc: claudiu.manoil, davem, kuba, netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Thu, 11 Feb 2021 12:54:11 -0500 you wrote:
> FSL_ENETC_MDIO use symbols from PHYLIB (MDIO_BUS) and MDIO_DEVRES,
> however there are no dependency specified in Kconfig
> 
> ERROR: modpost: "__mdiobus_register" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
> ERROR: modpost: "mdiobus_unregister" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
> ERROR: modpost: "devm_mdiobus_alloc_size" [drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko] undefined!
> 
> [...]

Here is the summary with links:
  - [v2] enetc: auto select PHYLIB and MDIO_DEVRES
    https://git.kernel.org/netdev/net/c/e185ea30df1f

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-12  2:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11 16:09 [PATCH] enetc: auto select PHYLIB and MDIO_DEVRES Tong Zhang
2021-02-11 17:38 ` Florian Fainelli
2021-02-11 17:54   ` [PATCH v2] " Tong Zhang
2021-02-12  2:20     ` patchwork-bot+netdevbpf
2021-02-11 17:54   ` [PATCH] " Tong Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).