All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Bluetooth: hci_qca: Wait for baudrate change event on WCN6750/6855/7850/QCC2072
@ 2026-12-02 13:14 Shuai Zhang
  2026-12-03  1:18 ` [v2] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Shuai Zhang @ 2026-12-02 13:14 UTC (permalink / raw)
  To: Bartosz Golaszewski, Marcel Holtmann, Luiz Augusto von Dentz
  Cc: linux-arm-msm, linux-bluetooth, linux-kernel, chejiang,
	quic_chezhou, wei.deng, jinwang.li, mengshi.wu, Cheng Jiang,
	Shuai Zhang

From: Cheng Jiang <cheng.jiang@oss.qualcomm.com>

The baudrate change command (0xfc48) is written straight to the UART, so
the HCI core does not track it. WCN6750, WCN6855, WCN7850 and QCC2072
answer it with a Command Complete event. The event arrives while the
first firmware download command is pending and ends up as:

  Bluetooth: hci0: unexpected event for opcode 0xfc48

Handle these SoCs like WCN3988/WCN3990: drop the event in
qca_recv_event() and wait for it in qca_set_speed().

Getting the event also confirms that the controller really switched to
the new baudrate. Without the wait, a mismatch between host and
controller only shows up later as a firmware download timeout.

Signed-off-by: Cheng Jiang <cheng.jiang@oss.qualcomm.com>
Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
---
changes for v2
 -- Change the commit author
 -- Link v1
    https://lore.kernel.org/all/20261202110933.2986272-1-shuai.zhang@oss.qualcomm.com/
---
 drivers/bluetooth/hci_qca.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index b6d7d0120..73722bbf1 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1229,7 +1229,10 @@ static int qca_recv_event(struct hci_dev *hdev, struct sk_buff *skb)
 		 * vendor command).
 		 */
 
-		if (hdr->evt == HCI_EV_VENDOR)
+		/* Newer SoCs answer the baudrate change with a Command Complete
+		 * instead of a vendor event. Drop it too.
+		 */
+		if (hdr->evt == HCI_EV_VENDOR || hdr->evt == HCI_EV_CMD_COMPLETE)
 			complete(&qca->drop_ev_comp);
 
 		kfree_skb(skb);
@@ -1527,6 +1530,10 @@ static int qca_set_speed(struct hci_uart *hu, enum qca_speed_type speed_type)
 
 		switch (soc_type) {
 		case QCA_WCN3990:
+		case QCA_WCN6750:
+		case QCA_WCN6855:
+		case QCA_WCN7850:
+		case QCA_QCC2072:
 			reinit_completion(&qca->drop_ev_comp);
 			set_bit(QCA_DROP_VENDOR_EVENT, &qca->flags);
 			break;
@@ -1563,6 +1570,10 @@ static int qca_set_speed(struct hci_uart *hu, enum qca_speed_type speed_type)
 
 		switch (soc_type) {
 		case QCA_WCN3990:
+		case QCA_WCN6750:
+		case QCA_WCN6855:
+		case QCA_WCN7850:
+		case QCA_QCC2072:
 			/* Wait for the controller to send the vendor event
 			 * for the baudrate change command.
 			 */
-- 
2.34.1


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

* RE: [v2] Bluetooth: hci_qca: Wait for baudrate change event on WCN6750/6855/7850/QCC2072
  2026-12-02 13:14 [PATCH v2] Bluetooth: hci_qca: Wait for baudrate change event on WCN6750/6855/7850/QCC2072 Shuai Zhang
@ 2026-12-03  1:18 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-12-03  1:18 UTC (permalink / raw)
  To: linux-bluetooth, shuai.zhang

[-- Attachment #1: Type: text/plain, Size: 9821 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1229500/

---Test result---

Test Summary:
CheckPatch                    PASS      0.77 seconds
VerifyFixes                   PASS      0.13 seconds
VerifySignedoff               PASS      0.13 seconds
GitLint                       FAIL      0.34 seconds
SubjectPrefix                 PASS      0.12 seconds
BuildKernel                   FAIL      25.67 seconds
CheckAllWarning               FAIL      29.01 seconds
CheckSparse                   FAIL      30.56 seconds
BuildKernel32                 FAIL      25.32 seconds
CheckKernelLLVM               FAIL      28.23 seconds
TestRunnerSetup               FAIL      723.79 seconds
IncrementalBuild              FAIL      23.60 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[v2] Bluetooth: hci_qca: Wait for baudrate change event on WCN6750/6855/7850/QCC2072

1: T1 Title exceeds max length (84>80): "[v2] Bluetooth: hci_qca: Wait for baudrate change event on WCN6750/6855/7850/QCC2072"
##############################
Test: BuildKernel - FAIL
Desc: Build Kernel for Bluetooth
Output:

drivers/bluetooth/hci_qca.c: In function ‘qca_set_speed’:
drivers/bluetooth/hci_qca.c:1536:22: error: ‘QCA_QCC2072’ undeclared (first use in this function); did you mean ‘QCA_QCA2066’?
 1536 |                 case QCA_QCC2072:
      |                      ^~~~~~~~~~~
      |                      QCA_QCA2066
drivers/bluetooth/hci_qca.c:1536:22: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [scripts/Makefile.build:290: drivers/bluetooth/hci_qca.o] Error 1
make[3]: *** [scripts/Makefile.build:572: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:572: drivers] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/home/runner/work/bluetooth-next/bluetooth-next/src/src/Makefile:2243: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2
##############################
Test: CheckAllWarning - FAIL
Desc: Run linux kernel with all warning enabled
Output:

drivers/bluetooth/hci_qca.c: In function ‘qca_set_speed’:
drivers/bluetooth/hci_qca.c:1536:22: error: ‘QCA_QCC2072’ undeclared (first use in this function); did you mean ‘QCA_QCA2066’?
 1536 |                 case QCA_QCC2072:
      |                      ^~~~~~~~~~~
      |                      QCA_QCA2066
drivers/bluetooth/hci_qca.c:1536:22: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [scripts/Makefile.build:290: drivers/bluetooth/hci_qca.o] Error 1
make[3]: *** [scripts/Makefile.build:572: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:572: drivers] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/home/runner/work/bluetooth-next/bluetooth-next/src/src/Makefile:2243: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2
##############################
Test: CheckSparse - FAIL
Desc: Run sparse tool with linux kernel
Output:

net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):
./include/net/bluetooth/hci.h:3140:47: warning: array of flexible structures
./include/net/bluetooth/hci.h:3226:43: warning: array of flexible structures
drivers/bluetooth/hci_qca.c: In function ‘qca_set_speed’:
drivers/bluetooth/hci_qca.c:1536:22: error: ‘QCA_QCC2072’ undeclared (first use in this function); did you mean ‘QCA_QCA2066’?
 1536 |                 case QCA_QCC2072:
      |                      ^~~~~~~~~~~
      |                      QCA_QCA2066
drivers/bluetooth/hci_qca.c:1536:22: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [scripts/Makefile.build:290: drivers/bluetooth/hci_qca.o] Error 1
make[3]: *** [scripts/Makefile.build:572: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:572: drivers] Error 2
make[2]: *** Waiting for unfinished jobs....
net/bluetooth/hci_codec.c: note: in included file:
./include/net/bluetooth/hci_core.h:151:35: warning: array of flexible structures
net/bluetooth/sco.c: note: in included file:
./include/net/bluetooth/hci_core.h:151:35: warning: array of flexible structures
make[1]: *** [/home/runner/work/bluetooth-next/bluetooth-next/src/src/Makefile:2243: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2
##############################
Test: BuildKernel32 - FAIL
Desc: Build 32bit Kernel for Bluetooth
Output:

drivers/bluetooth/hci_qca.c: In function ‘qca_set_speed’:
drivers/bluetooth/hci_qca.c:1536:22: error: ‘QCA_QCC2072’ undeclared (first use in this function); did you mean ‘QCA_QCA2066’?
 1536 |                 case QCA_QCC2072:
      |                      ^~~~~~~~~~~
      |                      QCA_QCA2066
drivers/bluetooth/hci_qca.c:1536:22: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [scripts/Makefile.build:290: drivers/bluetooth/hci_qca.o] Error 1
make[3]: *** [scripts/Makefile.build:572: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:572: drivers] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/home/runner/work/bluetooth-next/bluetooth-next/src/src/Makefile:2243: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2
##############################
Test: CheckKernelLLVM - FAIL
Desc: Build kernel with LLVM + context analysis
Output:

drivers/bluetooth/hci_qca.c:1536:8: error: use of undeclared identifier 'QCA_QCC2072'; did you mean 'QCA_QCA2066'?
 1536 |                 case QCA_QCC2072:
      |                      ^~~~~~~~~~~
      |                      QCA_QCA2066
drivers/bluetooth/btqca.h:156:2: note: 'QCA_QCA2066' declared here
  156 |         QCA_QCA2066,
      |         ^
drivers/bluetooth/hci_qca.c:1576:8: error: use of undeclared identifier 'QCA_QCC2072'; did you mean 'QCA_QCA2066'?
 1576 |                 case QCA_QCC2072:
      |                      ^~~~~~~~~~~
      |                      QCA_QCA2066
drivers/bluetooth/btqca.h:156:2: note: 'QCA_QCA2066' declared here
  156 |         QCA_QCA2066,
      |         ^
2 errors generated.
make[4]: *** [scripts/Makefile.build:290: drivers/bluetooth/hci_qca.o] Error 1
make[3]: *** [scripts/Makefile.build:572: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:572: drivers] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/home/runner/work/bluetooth-next/bluetooth-next/src/src/Makefile:2243: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2
##############################
Test: TestRunnerSetup - FAIL
Desc: Setup kernel and bluez for test-runner
Output:
Kernel: 
drivers/bluetooth/hci_qca.c: In function ‘qca_set_speed’:
drivers/bluetooth/hci_qca.c:1536:22: error: ‘QCA_QCC2072’ undeclared (first use in this function); did you mean ‘QCA_QCA2066’?
 1536 |                 case QCA_QCC2072:
      |                      ^~~~~~~~~~~
      |                      QCA_QCA2066
drivers/bluetooth/hci_qca.c:1536:22: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [scripts/Makefile.build:290: drivers/bluetooth/hci_qca.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:572: drivers/bluetooth] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:572: drivers] Error 2
make[1]: *** [/home/runner/work/bluetooth-next/bluetooth-next/src/src/Makefile:2243: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2
##############################
Test: IncrementalBuild - FAIL
Desc: Incremental build with the patches in the series
Output:

drivers/bluetooth/hci_qca.c: In function ‘qca_set_speed’:
drivers/bluetooth/hci_qca.c:1536:22: error: ‘QCA_QCC2072’ undeclared (first use in this function); did you mean ‘QCA_QCA2066’?
 1536 |                 case QCA_QCC2072:
      |                      ^~~~~~~~~~~
      |                      QCA_QCA2066
drivers/bluetooth/hci_qca.c:1536:22: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [scripts/Makefile.build:290: drivers/bluetooth/hci_qca.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:572: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:572: drivers] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/home/runner/work/bluetooth-next/bluetooth-next/src/src/Makefile:2243: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2
[v2] Bluetooth: hci_qca: Wait for baudrate change event on WCN6750/6855/7850/QCC2072

drivers/bluetooth/hci_qca.c: In function ‘qca_set_speed’:
drivers/bluetooth/hci_qca.c:1536:22: error: ‘QCA_QCC2072’ undeclared (first use in this function); did you mean ‘QCA_QCA2066’?
 1536 |                 case QCA_QCC2072:
      |                      ^~~~~~~~~~~
      |                      QCA_QCA2066
drivers/bluetooth/hci_qca.c:1536:22: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [scripts/Makefile.build:290: drivers/bluetooth/hci_qca.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:572: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:572: drivers] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/home/runner/work/bluetooth-next/bluetooth-next/src/src/Makefile:2243: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2


https://github.com/bluez/bluetooth-next/pull/1274

---
Regards,
Linux Bluetooth


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

end of thread, other threads:[~2026-12-03  1:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 13:14 [PATCH v2] Bluetooth: hci_qca: Wait for baudrate change event on WCN6750/6855/7850/QCC2072 Shuai Zhang
2026-12-03  1:18 ` [v2] " bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.