Bluetooth: hci_bcm: Do not change uart speed
PATCH 1/1 Bluetooth: hci_bcm: Do not change uart speed
From: Jonas Holmberg <[email protected]>
Do not change from init_speed to oper_speed per default since it may cause failures and timeouts if the uart cannot handle the new speed. orig_speed should probably be set using device tree instead.
--- drivers/bluetooth/hci_bcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bluetooth/hci_bcm.c +1 -1
@@ -809,7 +809,7 @@ static const struct hci_uart_proto bcm_proto = { .name = "Broadcom", .manufacturer = 15, .init_speed = 115200, - .oper_speed = 4000000, + .oper_speed = 0, .open = bcm_open, .close = bcm_close, .flush = bcm_flush,
Signature · 1 line
2.10.2
Marcel Holtmann
maintainerHi Jonas,
Quoted 12 lines
Do not change from
init_speedtooper_speedper default since it may cause failures and timeouts if the uart cannot handle the new speed.orig_speedshould probably be set using device tree instead.
---drivers/bluetooth/hci_bcm.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/bluetooth/hci_bcm.c +0
-0
drivers/bluetooth/hci_bcm.c static const struct hci_uart_proto bcm_proto = { · line 815
Quoted 8 lines
drivers/bluetooth/hci_bcm.c +1
-1@@ -809,7 +809,7 @@ static const struct hci_uart_proto bcm_proto = { .name = "Broadcom", .manufacturer = 15, .init_speed = 115200, - .oper_speed = 4000000, + .oper_speed = 0, .open = bcm_open, .close = bcm_close, .flush = bcm_flush,
I am generally fine with this, but the DT support for Broadcom UART devices is not yet upstream. And we need to make sure this also works for ACPI based devices. If we can get the max UART speed from ACPI, then I am fine doing it this way.
Regards
Marcel
Hello,
Quoted 9 lines · Marcel Holtmann
Hi Jonas,
Quoted 7 lines
Do not change from
init_speedtooper_speedper default since it may cause failures and timeouts if the uart cannot handle the new speed.orig_speedshould probably be set using device tree instead.
---drivers/bluetooth/hci_bcm.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines
drivers/bluetooth/hci_bcm.c static const struct hci_uart_proto bcm_proto = { · line 815
Quoted 13 lines
drivers/bluetooth/hci_bcm.c +1
-1@@ -809,7 +809,7 @@ static const struct hci_uart_proto bcm_proto = { .name = "Broadcom", .manufacturer = 15, .init_speed = 115200, - .oper_speed = 4000000, + .oper_speed = 0, .open = bcm_open, .close = bcm_close, .flush = bcm_flush,I am generally fine with this, but the DT support for Broadcom UART devices is not yet upstream. And we need to make sure this also works for ACPI based devices. If we can get the max UART speed from ACPI, then I am fine doing it this way.
Afair, the max UART speed is nor provided from ACPI, only the initial speed is provided, at least for the Asus T100TA.
Regards,
Frédéric
Hi,
Quoted 30 lines · Frédéric Danis
Hello,
Quoted 18 lines · Marcel Holtmann
Hi Jonas,
Quoted 16 lines
Do not change from
init_speedtooper_speedper default since it may cause failures and timeouts if the uart cannot handle the new speed.orig_speedshould probably be set using device tree instead.
---drivers/bluetooth/hci_bcm.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/bluetooth/hci_bcm.c +0
-1@@ -809,7 +809,7 @@ static const struct hci_uart_proto bcm_proto = { .name = "Broadcom", .manufacturer = 15, .init_speed = 115200, - .oper_speed = 4000000,Quoted 8 lines
drivers/bluetooth/hci_bcm.c static const struct hci_uart_proto bcm_proto = { · line 815
Quoted 4 lines
drivers/bluetooth/hci_bcm.c +1
-0+ .oper_speed = 0, .open = bcm_open, .close = bcm_close, .flush = bcm_flush,I am generally fine with this, but the DT support for Broadcom UART devices is not yet upstream. And we need to make sure this also works for ACPI based devices. If we can get the max UART speed from ACPI, then I am fine doing it this way.
Quoted 2 lines
Afair, the max UART speed is nor provided from ACPI, only the initial speed is provided, at least for the Asus T100TA.
Does that mean that I will need to patch the kernel for uarts that does not support 4000000 baud until the DT patches have been merged, or is there anything else that I can do?
It would be nice if this was a bit more obvious for the user somehow. I had to use git bisect to figure out why I got random errors and timeouts after upgrading to kernel version >= 4.2.
Regards
Jonas
Marcel Holtmann
maintainerHi Jonas,
Quoted 28 lines
Quoted 25 lines
Quoted 16 lines
Quoted 16 lines
Do not change from
init_speedtooper_speedper default since it may cause failures and timeouts if the uart cannot handle the new speed.orig_speedshould probably be set using device tree instead.
---drivers/bluetooth/hci_bcm.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/bluetooth/hci_bcm.c +0
-1@@ -809,7 +809,7 @@ static const struct hci_uart_proto bcm_proto = { .name = "Broadcom", .manufacturer = 15, .init_speed = 115200, - .oper_speed = 4000000,Quoted 8 lines
drivers/bluetooth/hci_bcm.c static const struct hci_uart_proto bcm_proto = { · line 815
Quoted 4 lines
drivers/bluetooth/hci_bcm.c +1
-0+ .oper_speed = 0, .open = bcm_open, .close = bcm_close, .flush = bcm_flush,I am generally fine with this, but the DT support for Broadcom UART devices is not yet upstream. And we need to make sure this also works for ACPI based devices. If we can get the max UART speed from ACPI, then I am fine doing it this way.
Quoted 2 lines
Afair, the max UART speed is nor provided from ACPI, only the initial speed is provided, at least for the Asus T100TA.
Quoted 7 lines
Does that mean that I will need to patch the kernel for uarts that does not support 4000000 baud until the DT patches have been merged, or is there anything else that I can do?
It would be nice if this was a bit more obvious for the user somehow. I had to use git bisect to figure out why I got random errors and timeouts after upgrading to kernel version >= 4.2.
that is a good question and I do not know a clear answer to that. We have to set it to some value. Running these with the default speed of 115200 works, but is also not really acceptable if anybody wants to do A2DP streaming. So what value to pick?
Maybe we can do some ACPI overlay or DT overlay over ACPI to allow setting this externally. But I would have to refer to the ACPI and DT experts on this.
Regards
Marcel