Linux-Bluetooth Archive on
 help / color / Atom feed
From: Sascha Hauer <>
Cc: Marcel Holtmann <>,
	Johan Hedberg <>,,
	Loic Poulain <>,, Sascha Hauer <>
Subject: [PATCH 2/3] Bluetooth: hci_mrvl: Wait for final ack before switching baudrate
Date: Fri, 14 Jun 2019 09:23:50 +0200
Message-ID: <> (raw)
In-Reply-To: <>

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 <>
 drivers/bluetooth/hci_mrvl.c | 3 +++
 1 file changed, 3 insertions(+)

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

  parent reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14  7:23 [PATCH 0/3] Marvell HCI fixes and serdev support Sascha Hauer
2019-06-14  7:23 ` [PATCH 1/3] Bluetooth: hci_ldisc: Add function to wait for characters to be sent Sascha Hauer
2019-06-14  7:23 ` Sascha Hauer [this message]
2019-06-14  7:23 ` [PATCH 3/3] Bluetooth: hci_mrvl: Add serdev support Sascha Hauer
2019-07-01  8:04 ` [PATCH 0/3] Marvell HCI fixes and " Sascha Hauer
2019-07-06 13:26 ` Marcel Holtmann

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Bluetooth Archive on

Archives are clonable:
	git clone --mirror linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ \
	public-inbox-index linux-bluetooth

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox