diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-06-14 09:23:50 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2019-07-06 12:53:56 +0200 |
commit | a55b896455f558075197d89e026c91fcea263627 (patch) | |
tree | f5e6005348f34ff605913a7154c9d044901f56be /drivers | |
parent | 40fbb915fd0f4b088f5c9b07061b7d665287d26f (diff) | |
download | linux-stable-a55b896455f558075197d89e026c91fcea263627.tar.gz linux-stable-a55b896455f558075197d89e026c91fcea263627.tar.bz2 linux-stable-a55b896455f558075197d89e026c91fcea263627.zip |
Bluetooth: hci_mrvl: Wait for final ack before switching baudrate
For the Marvell HCI UART we have to upload two firmware files. The first
one is only for switching the baudrate of the device to a higher
baudrate. After the baudrate switching firmware has been uploaded the
device waits for a final ack (0x5a) before actually switching the
baudrate. To send this final ack with the old baudrate give the hci
ldisc workqueue a chance to run before switching the baudrate. Without
this the final ack will never be received by the device and firmware
upload fails.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/bluetooth/hci_mrvl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/bluetooth/hci_mrvl.c b/drivers/bluetooth/hci_mrvl.c index 50212ac629e3..a0a74362455e 100644 --- a/drivers/bluetooth/hci_mrvl.c +++ b/drivers/bluetooth/hci_mrvl.c @@ -339,6 +339,9 @@ static int mrvl_setup(struct hci_uart *hu) return -EINVAL; } + /* Let the final ack go out before switching the baudrate */ + hci_uart_wait_until_sent(hu); + hci_uart_set_baudrate(hu, 3000000); hci_uart_set_flow_control(hu, false); |