linux/drivers/bluetooth
Shuai Zhang c347ca17d6 Bluetooth: hci_qca: Fix missing wakeup during SSR memdump handling
When a Bluetooth controller encounters a coredump, it triggers the
Subsystem Restart (SSR) mechanism. The controller first reports the
coredump data and, once the upload is complete, sends a hw_error
event. The host relies on this event to proceed with subsequent
recovery actions.

If the host has not finished processing the coredump data when the
hw_error event is received, it waits until either the processing is
complete or the 8-second timeout expires before handling the event.

The current implementation clears QCA_MEMDUMP_COLLECTION using
clear_bit(), which does not wake up waiters sleeping in
wait_on_bit_timeout(). As a result, the waiting thread may remain
blocked until the timeout expires even if the coredump collection
has already completed.

Fix this by clearing QCA_MEMDUMP_COLLECTION with
clear_and_wake_up_bit(), which also wakes up the waiting thread and
allows the hw_error handling to proceed immediately.

Test case:
- Trigger a controller coredump using:
    hcitool cmd 0x3f 0c 26
- Tested on QCA6390.
- Capture HCI logs using btmon.
- Verify that the delay between receiving the hw_error event and
  initiating the power-off sequence is reduced compared to the
  timeout-based behavior.

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Shuai Zhang <shuai.zhang@oss.qualcomm.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2026-04-13 09:19:42 -04:00
..
Kconfig
Makefile
ath3k.c
bcm203x.c
bfusb.c
bluecard_cs.c
bpa10x.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
bt3c_cs.c
btbcm.c Bluetooth: btbcm: Add entry for BCM4343A2 UART Bluetooth 2026-04-10 10:22:21 -04:00
btbcm.h
btintel.c Bluetooth: btintel: Add support for Scorpious Peak2F support 2026-04-10 10:28:44 -04:00
btintel.h Bluetooth: btintel_pcie: Add support for exception dump for ScP2F 2026-04-10 10:29:03 -04:00
btintel_pcie.c Bluetooth: btintel_pcie: use strscpy to copy plain strings 2026-04-13 09:19:42 -04:00
btintel_pcie.h Bluetooth: btintel_pcie: Align shared DMA memory to 128 bytes 2026-04-13 09:19:42 -04:00
btmrvl_debugfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
btmrvl_drv.h
btmrvl_main.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
btmrvl_sdio.c
btmrvl_sdio.h
btmtk.c Bluetooth: btmtk: hide unused btmtk_mt6639_devs[] array 2026-04-13 09:19:27 -04:00
btmtk.h Bluetooth: btmtk: Add MT6639 (MT7927) Bluetooth support 2026-04-13 09:18:16 -04:00
btmtksdio.c Bluetooth: btmtk: Add MT6639 (MT7927) Bluetooth support 2026-04-13 09:18:16 -04:00
btmtkuart.c
btnxpuart.c
btqca.c Bluetooth: qca: Refactor code on the basis of chipset names 2026-04-10 10:22:00 -04:00
btqca.h
btqcomsmd.c
btrsi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
btrtl.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
btrtl.h
btsdio.c
btusb.c Bluetooth: btusb: MediaTek MT7922: Add VID 0489 & PID e11d 2026-04-13 09:19:42 -04:00
dtl1_cs.c
hci_ag6xx.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hci_aml.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hci_ath.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hci_bcm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hci_bcm4377.c
hci_bcsp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hci_h4.c Bluetooth: hci_h4: Fix race during initialization 2026-04-01 16:45:47 -04:00
hci_h5.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hci_intel.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hci_ldisc.c Bluetooth: hci_ldisc: Clear HCI_UART_PROTO_INIT on error 2026-04-13 09:18:16 -04:00
hci_ll.c Bluetooth: hci_ll: Enable BROKEN_ENHANCED_SETUP_SYNC_CONN for WL183x 2026-04-13 09:19:42 -04:00
hci_mrvl.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hci_nokia.c
hci_qca.c Bluetooth: hci_qca: Fix missing wakeup during SSR memdump handling 2026-04-13 09:19:42 -04:00
hci_serdev.c
hci_uart.h
hci_vhci.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
virtio_bt.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00