All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] net/phy: fix phy_bcm_nsp_usb3.c build and kconfig
@ 2017-01-31  1:02 Randy Dunlap
  2017-01-31  1:13 ` Florian Fainelli
  2017-01-31 18:23 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2017-01-31  1:02 UTC (permalink / raw)
  To: netdev, David Miller; +Cc: Yendapally Reddy Dhananjaya Reddy

From: Randy Dunlap <rdunlap@infradead.org>

This driver uses mdio* (PHYLIB) interfaces, so it should select
PHYLIB. PHYLIB depends on NETDEVICES to this driver should also
depend on NETDEVICES.

Fixes these build errors:

drivers/built-in.o: In function `nsp_usb3_phy_init':
phy-bcm-nsp-usb3.c:(.text+0x42d8): undefined reference to `mdiobus_write'
phy-bcm-nsp-usb3.c:(.text+0x42f4): undefined reference to `mdiobus_write'
phy-bcm-nsp-usb3.c:(.text+0x4310): undefined reference to `mdiobus_write'
phy-bcm-nsp-usb3.c:(.text+0x432c): undefined reference to `mdiobus_write'
phy-bcm-nsp-usb3.c:(.text+0x4348): undefined reference to `mdiobus_write'
drivers/built-in.o:phy-bcm-nsp-usb3.c:(.text+0x437a): more undefined references to `mdiobus_write' follow
drivers/built-in.o: In function `mdio_module_init':
phy-bcm-nsp-usb3.c:(.init.text+0x1e1): undefined reference to `mdio_driver_register'
drivers/built-in.o: In function `mdio_module_exit':
phy-bcm-nsp-usb3.c:(.exit.text+0xae): undefined reference to `mdio_driver_unregister'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Yendapally Reddy Dhananjaya Reddy <yendapally.reddy@broadcom.com>
---
 drivers/phy/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-next-20170130.orig/drivers/phy/Kconfig
+++ linux-next-20170130/drivers/phy/Kconfig
@@ -504,8 +504,9 @@ config PHY_MESON8B_USB2
 
 config PHY_NSP_USB3
 	tristate "Broadcom NorthStar plus USB3 PHY driver"
-	depends on OF && (ARCH_BCM_NSP || COMPILE_TEST)
+	depends on OF && (ARCH_BCM_NSP || COMPILE_TEST) && NETDEVICES
 	select GENERIC_PHY
+	select PHYLIB
 	default ARCH_BCM_NSP
 	help
 	  Enable this to support the Broadcom Northstar plus USB3 PHY.

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

* Re: [PATCH -next] net/phy: fix phy_bcm_nsp_usb3.c build and kconfig
  2017-01-31  1:02 [PATCH -next] net/phy: fix phy_bcm_nsp_usb3.c build and kconfig Randy Dunlap
@ 2017-01-31  1:13 ` Florian Fainelli
  2017-01-31 18:23 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2017-01-31  1:13 UTC (permalink / raw)
  To: Randy Dunlap, netdev, David Miller
  Cc: Yendapally Reddy Dhananjaya Reddy, Andrew Lunn

On 01/30/2017 05:02 PM, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
> 
> This driver uses mdio* (PHYLIB) interfaces, so it should select
> PHYLIB. PHYLIB depends on NETDEVICES to this driver should also
> depend on NETDEVICES.
> 
> Fixes these build errors:
> 
> drivers/built-in.o: In function `nsp_usb3_phy_init':
> phy-bcm-nsp-usb3.c:(.text+0x42d8): undefined reference to `mdiobus_write'
> phy-bcm-nsp-usb3.c:(.text+0x42f4): undefined reference to `mdiobus_write'
> phy-bcm-nsp-usb3.c:(.text+0x4310): undefined reference to `mdiobus_write'
> phy-bcm-nsp-usb3.c:(.text+0x432c): undefined reference to `mdiobus_write'
> phy-bcm-nsp-usb3.c:(.text+0x4348): undefined reference to `mdiobus_write'
> drivers/built-in.o:phy-bcm-nsp-usb3.c:(.text+0x437a): more undefined references to `mdiobus_write' follow
> drivers/built-in.o: In function `mdio_module_init':
> phy-bcm-nsp-usb3.c:(.init.text+0x1e1): undefined reference to `mdio_driver_register'
> drivers/built-in.o: In function `mdio_module_exit':
> phy-bcm-nsp-usb3.c:(.exit.text+0xae): undefined reference to `mdio_driver_unregister'
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Yendapally Reddy Dhananjaya Reddy <yendapally.reddy@broadcom.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>

This is certainly a good fix for now, but I think we really need to
split the PHY library and its state machine from generic support for
MDIO buses and devices, let me see if I can come up with something for that.

Thanks!

> ---
>  drivers/phy/Kconfig |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- linux-next-20170130.orig/drivers/phy/Kconfig
> +++ linux-next-20170130/drivers/phy/Kconfig
> @@ -504,8 +504,9 @@ config PHY_MESON8B_USB2
>  
>  config PHY_NSP_USB3
>  	tristate "Broadcom NorthStar plus USB3 PHY driver"
> -	depends on OF && (ARCH_BCM_NSP || COMPILE_TEST)
> +	depends on OF && (ARCH_BCM_NSP || COMPILE_TEST) && NETDEVICES
>  	select GENERIC_PHY
> +	select PHYLIB
>  	default ARCH_BCM_NSP
>  	help
>  	  Enable this to support the Broadcom Northstar plus USB3 PHY.
> 


-- 
Florian

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

* Re: [PATCH -next] net/phy: fix phy_bcm_nsp_usb3.c build and kconfig
  2017-01-31  1:02 [PATCH -next] net/phy: fix phy_bcm_nsp_usb3.c build and kconfig Randy Dunlap
  2017-01-31  1:13 ` Florian Fainelli
@ 2017-01-31 18:23 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-01-31 18:23 UTC (permalink / raw)
  To: rdunlap; +Cc: netdev, yendapally.reddy

From: Randy Dunlap <rdunlap@infradead.org>
Date: Mon, 30 Jan 2017 17:02:44 -0800

> From: Randy Dunlap <rdunlap@infradead.org>
> 
> This driver uses mdio* (PHYLIB) interfaces, so it should select
> PHYLIB. PHYLIB depends on NETDEVICES to this driver should also
> depend on NETDEVICES.
> 
> Fixes these build errors:
> 
> drivers/built-in.o: In function `nsp_usb3_phy_init':
> phy-bcm-nsp-usb3.c:(.text+0x42d8): undefined reference to `mdiobus_write'
> phy-bcm-nsp-usb3.c:(.text+0x42f4): undefined reference to `mdiobus_write'
> phy-bcm-nsp-usb3.c:(.text+0x4310): undefined reference to `mdiobus_write'
> phy-bcm-nsp-usb3.c:(.text+0x432c): undefined reference to `mdiobus_write'
> phy-bcm-nsp-usb3.c:(.text+0x4348): undefined reference to `mdiobus_write'
> drivers/built-in.o:phy-bcm-nsp-usb3.c:(.text+0x437a): more undefined references to `mdiobus_write' follow
> drivers/built-in.o: In function `mdio_module_init':
> phy-bcm-nsp-usb3.c:(.init.text+0x1e1): undefined reference to `mdio_driver_register'
> drivers/built-in.o: In function `mdio_module_exit':
> phy-bcm-nsp-usb3.c:(.exit.text+0xae): undefined reference to `mdio_driver_unregister'
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>

This doesn't apply to the net-next tree, please respin.

Thanks.

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

end of thread, other threads:[~2017-01-31 18:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-31  1:02 [PATCH -next] net/phy: fix phy_bcm_nsp_usb3.c build and kconfig Randy Dunlap
2017-01-31  1:13 ` Florian Fainelli
2017-01-31 18:23 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.