linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bluetooth: hci_ll: add proper SERDEV dependency
@ 2017-05-11 11:41 Arnd Bergmann
  2017-05-11 15:03 ` Rob Herring
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Arnd Bergmann @ 2017-05-11 11:41 UTC (permalink / raw)
  To: Marcel Holtmann, Gustavo Padovan, Johan Hedberg
  Cc: Arnd Bergmann, Rob Herring, Bjorn Andersson, David S. Miller,
	Andy Gross, Loic Poulain, Sebastian Reichel,
	Javier Martinez Canillas, linux-bluetooth, linux-kernel

When SERDEV is a loadable module, and the HCI code is built-in, we
get a link error:

drivers/bluetooth/built-in.o: In function `ll_close':
hci_ll.c:(.text+0x278d): undefined reference to `serdev_device_close'
drivers/bluetooth/built-in.o: In function `hci_ti_probe':
hci_ll.c:(.text+0x283c): undefined reference to `hci_uart_register_device'
drivers/bluetooth/built-in.o: In function `ll_setup':
hci_ll.c:(.text+0x289e): undefined reference to `serdev_device_set_flow_control'
hci_ll.c:(.text+0x2b9c): undefined reference to `serdev_device_set_baudrate'
drivers/bluetooth/built-in.o: In function `ll_open':
hci_ll.c:(.text+0x2c77): undefined reference to `serdev_device_open'
drivers/bluetooth/built-in.o: In function `ll_init':
(.init.text+0x10d): undefined reference to `__serdev_device_driver_register'

We already have CONFIG_BT_HCIUART_SERDEV as a Kconfig symbol that is
set when the serdev code is reachable by a driver. Unlike the nokia
driver, this one can also be built when serdev is completely disabled,
so we add a dependency on serdev either being usable or disabled here.

Fixes: 371805522f87 ("bluetooth: hci_uart: add LL protocol serdev driver support")
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/bluetooth/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
index a63130ef2b98..b2cf0ae6b62d 100644
--- a/drivers/bluetooth/Kconfig
+++ b/drivers/bluetooth/Kconfig
@@ -133,6 +133,7 @@ config BT_HCIUART_ATH3K
 config BT_HCIUART_LL
 	bool "HCILL protocol support"
 	depends on BT_HCIUART
+	depends on BT_HCIUART_SERDEV || SERIAL_DEV_BUS=n
 	help
 	  HCILL (HCI Low Level) is a serial protocol for communication
 	  between Bluetooth device and host. This protocol is required for
-- 
2.9.0

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

* Re: [PATCH] bluetooth: hci_ll: add proper SERDEV dependency
  2017-05-11 11:41 [PATCH] bluetooth: hci_ll: add proper SERDEV dependency Arnd Bergmann
@ 2017-05-11 15:03 ` Rob Herring
  2017-05-11 18:12 ` Sebastian Reichel
  2017-05-18 14:58 ` Marcel Holtmann
  2 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2017-05-11 15:03 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Marcel Holtmann, Gustavo Padovan, Johan Hedberg, Bjorn Andersson,
	David S. Miller, Andy Gross, Loic Poulain, Sebastian Reichel,
	Javier Martinez Canillas, open list:BLUETOOTH DRIVERS,
	linux-kernel

On Thu, May 11, 2017 at 6:41 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> When SERDEV is a loadable module, and the HCI code is built-in, we
> get a link error:
>
> drivers/bluetooth/built-in.o: In function `ll_close':
> hci_ll.c:(.text+0x278d): undefined reference to `serdev_device_close'
> drivers/bluetooth/built-in.o: In function `hci_ti_probe':
> hci_ll.c:(.text+0x283c): undefined reference to `hci_uart_register_device'
> drivers/bluetooth/built-in.o: In function `ll_setup':
> hci_ll.c:(.text+0x289e): undefined reference to `serdev_device_set_flow_control'
> hci_ll.c:(.text+0x2b9c): undefined reference to `serdev_device_set_baudrate'
> drivers/bluetooth/built-in.o: In function `ll_open':
> hci_ll.c:(.text+0x2c77): undefined reference to `serdev_device_open'
> drivers/bluetooth/built-in.o: In function `ll_init':
> (.init.text+0x10d): undefined reference to `__serdev_device_driver_register'
>
> We already have CONFIG_BT_HCIUART_SERDEV as a Kconfig symbol that is
> set when the serdev code is reachable by a driver. Unlike the nokia
> driver, this one can also be built when serdev is completely disabled,
> so we add a dependency on serdev either being usable or disabled here.

I thought this was okay because of the differences with the nokia
driver, but I should have tested it. In hindsight, serdev as a module
is really a PIA considering that it effectively has to be built-in due
to TTY dependencies.

Acked-by: Rob Herring <robh@kernel.org>

>
> Fixes: 371805522f87 ("bluetooth: hci_uart: add LL protocol serdev driver support")
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/bluetooth/Kconfig | 1 +
>  1 file changed, 1 insertion(+)

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

* Re: [PATCH] bluetooth: hci_ll: add proper SERDEV dependency
  2017-05-11 11:41 [PATCH] bluetooth: hci_ll: add proper SERDEV dependency Arnd Bergmann
  2017-05-11 15:03 ` Rob Herring
@ 2017-05-11 18:12 ` Sebastian Reichel
  2017-05-18 14:58 ` Marcel Holtmann
  2 siblings, 0 replies; 4+ messages in thread
From: Sebastian Reichel @ 2017-05-11 18:12 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Marcel Holtmann, Gustavo Padovan, Johan Hedberg, Rob Herring,
	Bjorn Andersson, David S. Miller, Andy Gross, Loic Poulain,
	Javier Martinez Canillas, linux-bluetooth, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2293 bytes --]

Hi,

On Thu, May 11, 2017 at 01:41:54PM +0200, Arnd Bergmann wrote:
> When SERDEV is a loadable module, and the HCI code is built-in, we
> get a link error:
> 
> drivers/bluetooth/built-in.o: In function `ll_close':
> hci_ll.c:(.text+0x278d): undefined reference to `serdev_device_close'
> drivers/bluetooth/built-in.o: In function `hci_ti_probe':
> hci_ll.c:(.text+0x283c): undefined reference to `hci_uart_register_device'
> drivers/bluetooth/built-in.o: In function `ll_setup':
> hci_ll.c:(.text+0x289e): undefined reference to `serdev_device_set_flow_control'
> hci_ll.c:(.text+0x2b9c): undefined reference to `serdev_device_set_baudrate'
> drivers/bluetooth/built-in.o: In function `ll_open':
> hci_ll.c:(.text+0x2c77): undefined reference to `serdev_device_open'
> drivers/bluetooth/built-in.o: In function `ll_init':
> (.init.text+0x10d): undefined reference to `__serdev_device_driver_register'
> 
> We already have CONFIG_BT_HCIUART_SERDEV as a Kconfig symbol that is
> set when the serdev code is reachable by a driver. Unlike the nokia
> driver, this one can also be built when serdev is completely disabled,
> so we add a dependency on serdev either being usable or disabled here.
> 
> Fixes: 371805522f87 ("bluetooth: hci_uart: add LL protocol serdev driver support")
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Sebastian Reichel <sre@kernel.org>

-- Sebastian

> ---
>  drivers/bluetooth/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
> index a63130ef2b98..b2cf0ae6b62d 100644
> --- a/drivers/bluetooth/Kconfig
> +++ b/drivers/bluetooth/Kconfig
> @@ -133,6 +133,7 @@ config BT_HCIUART_ATH3K
>  config BT_HCIUART_LL
>  	bool "HCILL protocol support"
>  	depends on BT_HCIUART
> +	depends on BT_HCIUART_SERDEV || SERIAL_DEV_BUS=n
>  	help
>  	  HCILL (HCI Low Level) is a serial protocol for communication
>  	  between Bluetooth device and host. This protocol is required for
> -- 
> 2.9.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] bluetooth: hci_ll: add proper SERDEV dependency
  2017-05-11 11:41 [PATCH] bluetooth: hci_ll: add proper SERDEV dependency Arnd Bergmann
  2017-05-11 15:03 ` Rob Herring
  2017-05-11 18:12 ` Sebastian Reichel
@ 2017-05-18 14:58 ` Marcel Holtmann
  2 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2017-05-18 14:58 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Gustavo F. Padovan, Johan Hedberg, Rob Herring, Bjorn Andersson,
	David S. Miller, Andy Gross, Loic Poulain, Sebastian Reichel,
	Javier Martinez Canillas, linux-bluetooth, linux-kernel

Hi Arnd,

> When SERDEV is a loadable module, and the HCI code is built-in, we
> get a link error:
> 
> drivers/bluetooth/built-in.o: In function `ll_close':
> hci_ll.c:(.text+0x278d): undefined reference to `serdev_device_close'
> drivers/bluetooth/built-in.o: In function `hci_ti_probe':
> hci_ll.c:(.text+0x283c): undefined reference to `hci_uart_register_device'
> drivers/bluetooth/built-in.o: In function `ll_setup':
> hci_ll.c:(.text+0x289e): undefined reference to `serdev_device_set_flow_control'
> hci_ll.c:(.text+0x2b9c): undefined reference to `serdev_device_set_baudrate'
> drivers/bluetooth/built-in.o: In function `ll_open':
> hci_ll.c:(.text+0x2c77): undefined reference to `serdev_device_open'
> drivers/bluetooth/built-in.o: In function `ll_init':
> (.init.text+0x10d): undefined reference to `__serdev_device_driver_register'
> 
> We already have CONFIG_BT_HCIUART_SERDEV as a Kconfig symbol that is
> set when the serdev code is reachable by a driver. Unlike the nokia
> driver, this one can also be built when serdev is completely disabled,
> so we add a dependency on serdev either being usable or disabled here.
> 
> Fixes: 371805522f87 ("bluetooth: hci_uart: add LL protocol serdev driver support")
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/bluetooth/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
> index a63130ef2b98..b2cf0ae6b62d 100644
> --- a/drivers/bluetooth/Kconfig
> +++ b/drivers/bluetooth/Kconfig
> @@ -133,6 +133,7 @@ config BT_HCIUART_ATH3K
> config BT_HCIUART_LL
> 	bool "HCILL protocol support"
> 	depends on BT_HCIUART
> +	depends on BT_HCIUART_SERDEV || SERIAL_DEV_BUS=n
> 	help
> 	  HCILL (HCI Low Level) is a serial protocol for communication
> 	  between Bluetooth device and host. This protocol is required for

this does not apply against bluetooth-next tree. Can you respin it with the acks.

Regards

Marcel

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

end of thread, other threads:[~2017-05-18 14:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-11 11:41 [PATCH] bluetooth: hci_ll: add proper SERDEV dependency Arnd Bergmann
2017-05-11 15:03 ` Rob Herring
2017-05-11 18:12 ` Sebastian Reichel
2017-05-18 14:58 ` Marcel Holtmann

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).