Skip to contentSkip to conversation

bluetooth: hci_ll: add proper SERDEV dependency

PATCH In review Arnd Bergmann 4 participants 4 messages May 11, 2017 – May 18, 2017 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bluetooth: hci_ll: add proper SERDEV dependency

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 <[email protected]>
---
 drivers/bluetooth/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/bluetooth/Kconfig +1 -0
index a63130ef2b98..b2cf0ae6b62d 100644
@@ -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
Signature · 1 line
2.9.0
Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · Arnd Bergmann

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'

Quoted 4 lines

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.

Quoted 7 lines
Fixes 371805522f87 ("bluetooth: hci_uart: add LL protocol serdev driver support")
Cc Rob Herring <[email protected]>
---
 drivers/bluetooth/Kconfig | 1 +
 1 file changed, 1 insertion(+)
Reviewed-by on v1 1/1
#2 lore raw
In reply to Arnd Bergmann

Hi,

Quoted 15 lines · Arnd Bergmann

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'

Quoted 8 lines

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 <[email protected]>

-- Sebastian

Quoted 23 lines
---
 drivers/bluetooth/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/bluetooth/Kconfig +1 -0
index a63130ef2b98..b2cf0ae6b62d 100644
@@ -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
Signature · 6 lines
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer
#3 lore raw
In reply to Arnd Bergmann

Hi Arnd,

Quoted 36 lines

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 <[email protected]>

---
drivers/bluetooth/Kconfig | 1 +

1 file changed, 1 insertion(+)
drivers/bluetooth/Kconfig +0 -0
index a63130ef2b98..b2cf0ae6b62d 100644
@@ -133,6 +133,7 @@ config BT_HCIUART_ATH3K

config BT_HCIUART_LL
bool "HCILL protocol support"
depends on BT_HCIUART

drivers/bluetooth/Kconfig +1 -0
+	depends on BT_HCIUART_SERDEV || SERIAL_DEV_BUS=n
Quoted 3 lines

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