linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bluetooth: hci_uart: fix kconfig dependency
@ 2017-05-02 13:15 Tobias Regnery
  2017-05-02 18:07 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Regnery @ 2017-05-02 13:15 UTC (permalink / raw)
  To: robh, marcel
  Cc: gustavo, johan.hedberg, linux-bluetooth, linux-kernel, Tobias Regnery

We see the following link error with CONFIG_BT_HCIUART=y,
CONFIG_BT_HCIUART_LL=y and CONFIG_SERIAL_DEV_BUS=m:

drivers/built-in.o: In function 'll_close':
supp.c:(.text+0x55add4): undefined reference to 'serdev_device_close'
supp.c:(.text+0x55add4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'serdev_device_close'
drivers/built-in.o: In function 'll_open':
supp.c:(.text+0x55aed0): undefined reference to 'serdev_device_open'
supp.c:(.text+0x55aed0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'serdev_device_open'
drivers/built-in.o: In function `hci_ti_probe':
supp.c:(.text+0x55b00c): undefined reference to 'hci_uart_register_device'
supp.c:(.text+0x55b00c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'hci_uart_register_device'
drivers/built-in.o: In function `ll_setup':
supp.c:(.text+0x55b08c): undefined reference to 'serdev_device_set_flow_control'
supp.c:(.text+0x55b08c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'serdev_device_set_flow_control'
supp.c:(.text+0x55b324): undefined reference to 'serdev_device_set_baudrate'
supp.c:(.text+0x55b324): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'serdev_device_set_baudrate'
drivers/built-in.o: In function 'll_init':
supp.c:(.init.text+0x1b508): undefined reference to '__serdev_device_driver_register'
supp.c:(.init.text+0x1b508): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol '__serdev_device_driver_register'

Fix this by dependig BT_HCIUART_LL on the BT_HCIUART_SERDEV symbol.
This implies a dependency on BT_HCIUART and hci_ll.c is only compiled in
if SERIAl_DEV_BUS is built in or SERIAL_DEV_BUS and BT_HCIUART are
modules.

Fixes: 371805522f87 ("bluetooth: hci_uart: add LL protocol serdev driver support")
Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
---
Hi,

I'm not sure if this is the right fix because the dependencies are quite
complicated but at least the build failure goes away with this change.

 drivers/bluetooth/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
index 737d93ef27c5..e5fd24d90b0a 100644
--- a/drivers/bluetooth/Kconfig
+++ b/drivers/bluetooth/Kconfig
@@ -131,7 +131,7 @@ config BT_HCIUART_ATH3K
 
 config BT_HCIUART_LL
 	bool "HCILL protocol support"
-	depends on BT_HCIUART
+	depends on BT_HCIUART_SERDEV
 	help
 	  HCILL (HCI Low Level) is a serial protocol for communication
 	  between Bluetooth device and host. This protocol is required for
-- 
2.11.0

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

* Re: [PATCH] bluetooth: hci_uart: fix kconfig dependency
  2017-05-02 13:15 [PATCH] bluetooth: hci_uart: fix kconfig dependency Tobias Regnery
@ 2017-05-02 18:07 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2017-05-02 18:07 UTC (permalink / raw)
  To: Tobias Regnery
  Cc: Rob Herring, Gustavo F. Padovan, Johan Hedberg, linux-bluetooth,
	linux-kernel

Hi Tobias,

> We see the following link error with CONFIG_BT_HCIUART=y,
> CONFIG_BT_HCIUART_LL=y and CONFIG_SERIAL_DEV_BUS=m:
> 
> drivers/built-in.o: In function 'll_close':
> supp.c:(.text+0x55add4): undefined reference to 'serdev_device_close'
> supp.c:(.text+0x55add4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'serdev_device_close'
> drivers/built-in.o: In function 'll_open':
> supp.c:(.text+0x55aed0): undefined reference to 'serdev_device_open'
> supp.c:(.text+0x55aed0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'serdev_device_open'
> drivers/built-in.o: In function `hci_ti_probe':
> supp.c:(.text+0x55b00c): undefined reference to 'hci_uart_register_device'
> supp.c:(.text+0x55b00c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'hci_uart_register_device'
> drivers/built-in.o: In function `ll_setup':
> supp.c:(.text+0x55b08c): undefined reference to 'serdev_device_set_flow_control'
> supp.c:(.text+0x55b08c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'serdev_device_set_flow_control'
> supp.c:(.text+0x55b324): undefined reference to 'serdev_device_set_baudrate'
> supp.c:(.text+0x55b324): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'serdev_device_set_baudrate'
> drivers/built-in.o: In function 'll_init':
> supp.c:(.init.text+0x1b508): undefined reference to '__serdev_device_driver_register'
> supp.c:(.init.text+0x1b508): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol '__serdev_device_driver_register'
> 
> Fix this by dependig BT_HCIUART_LL on the BT_HCIUART_SERDEV symbol.
> This implies a dependency on BT_HCIUART and hci_ll.c is only compiled in
> if SERIAl_DEV_BUS is built in or SERIAL_DEV_BUS and BT_HCIUART are
> modules.
> 
> Fixes: 371805522f87 ("bluetooth: hci_uart: add LL protocol serdev driver support")
> Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
> ---
> Hi,
> 
> I'm not sure if this is the right fix because the dependencies are quite
> complicated but at least the build failure goes away with this change.
> 
> drivers/bluetooth/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-02 13:15 [PATCH] bluetooth: hci_uart: fix kconfig dependency Tobias Regnery
2017-05-02 18:07 ` 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).