linux/drivers/bluetooth
Kiran K 5471367037 Bluetooth: btintel_pcie: Fix Alive Context State Handling
The firmware raises an alive interrupt upon sending the HCI_RESET or
BTINTEL_HCI_OP_RESET command. As part of handling the reset command,
firmware initializes the hardware and data path and raises the alive
interrupt. Upon receiving the alive interrupt, the driver must enable
the data path and grant RX buffers to the firmware before sending any
commands.

The alive context maintained in the driver must be updated before
sending BTINTEL_HCI_OP_RESET or HCI_OP_RESET to prevent a potential race
condition where the context is also updated in the threaded IRQ.

The issue was observed in a stress reboot usecase (1/25) using "sudo
reboot" command where the firmware download was failing as the driver
was not granting RX buffer to firmware due to race condition.

Bluetooth: hci0: API lock is disabled
Bluetooth: hci0: Debug lock is disabled
Bluetooth: hci0: Minimum firmware build 1 week 10 2014
Bluetooth: hci0: Bootloader timestamp 2023.43 buildtype 1 build 11631
Bluetooth: hci0: Found device firmware: intel/ibt-00a0-00a1-iml.sfi
Bluetooth: hci0: Boot Address: 0xb0301000
Bluetooth: hci0: Firmware Version: 167-12.25
Bluetooth: hci0: Waiting for firmware download to complete
Bluetooth: hci0: Firmware loaded in 99902 usecs
Bluetooth: hci0: Alive context: fw_dl old_boot_stage: 0xa0db0003
           new_boot_stage: 0xa0db0003
Bluetooth: hci0: sent cmd: 0xfc01 alive context changed:
           fw_dl  ->  intel_reset1
Bluetooth: hci0: Waiting for device to boot
Bluetooth: hci0: Device boot timeout
Bluetooth: hci0: Firmware download retry count: 1

Fixes: 05c200c8f0 ("Bluetooth: btintel_pcie: Add handshake between driver and firmware")
Signed-off-by: Kiran K <kiran.k@intel.com>
Signed-off-by: Sai Teja Aluvala <aluvala.sai.teja@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2025-07-23 10:34:30 -04:00
..
ath3k.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
bcm203x.c
bfusb.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-16 15:37:53 -04:00
bluecard_cs.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
bpa10x.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-16 15:37:53 -04:00
bt3c_cs.c
btbcm.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-16 15:37:53 -04:00
btbcm.h Bluetooth: hci_bcm: Add support for FW loading in autobaud mode 2022-07-21 17:04:38 -07:00
btintel.c Bluetooth: btintel: Define a macro for Intel Reset vendor command 2025-07-23 10:31:03 -04:00
btintel.h Bluetooth: btintel: Define a macro for Intel Reset vendor command 2025-07-23 10:31:03 -04:00
btintel_pcie.c Bluetooth: btintel_pcie: Fix Alive Context State Handling 2025-07-23 10:34:30 -04:00
btintel_pcie.h Bluetooth: btintel_pcie: Support Function level reset 2025-07-23 10:23:57 -04:00
btmrvl_debugfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_390.RULE 2022-06-10 14:51:36 +02:00
btmrvl_drv.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_390.RULE 2022-06-10 14:51:36 +02:00
btmrvl_main.c Bluetooth: Use str_enable_disable-like helpers 2025-01-15 10:36:11 -05:00
btmrvl_sdio.c Bluetooth: btmrvl_sdio: Fix wakeup source leaks on device unbind 2025-05-21 10:27:20 -04:00
btmrvl_sdio.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_390.RULE 2022-06-10 14:51:36 +02:00
btmtk.c Bluetooth: btmtk: Remove the resetting step before downloading the fw 2025-03-25 12:51:10 -04:00
btmtk.h Bluetooth: btmtk: remove #ifdef around declarations 2024-07-26 10:56:54 -04:00
btmtksdio.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-16 15:37:53 -04:00
btmtkuart.c Bluetooth: btmtk: Fix typo in log string 2025-07-23 10:29:34 -04:00
btnxpuart.c Bluetooth: btnxpuart: Add uevents for FW dump and FW download complete 2025-07-23 10:32:23 -04:00
btqca.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-16 15:37:53 -04:00
btqca.h Bluetooth: qca: add WCN3950 support 2025-03-25 12:42:35 -04:00
btqcomsmd.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-16 15:37:53 -04:00
btrsi.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
btrtl.c Bluetooth: btrtl: Fix typo in comment 2025-07-23 10:29:50 -04:00
btrtl.h Bluetooth: btrtl: Add Realtek devcoredump support 2023-08-11 11:35:14 -07:00
btsdio.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-16 15:37:53 -04:00
btusb.c Bluetooth: btusb: Add one more ID 0x28de:0x1401 for Qualcomm WCN6855 2025-07-23 10:33:13 -04:00
dtl1_cs.c
h4_recv.h move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hci_ag6xx.c
hci_aml.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-16 15:37:53 -04:00
hci_ath.c
hci_bcm.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-16 15:37:53 -04:00
hci_bcm4377.c Bluetooth: hci_bcm4377: Fix typo in comment 2025-07-23 10:30:04 -04:00
hci_bcsp.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
hci_h4.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hci_h5.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
hci_intel.c Bluetooth: btintel: Define a macro for Intel Reset vendor command 2025-07-23 10:31:03 -04:00
hci_ldisc.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-16 15:37:53 -04:00
hci_ll.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-16 15:37:53 -04:00
hci_mrvl.c Bluetooth: hci_mrvl: Add serdev support for 88W8997 2023-04-23 21:45:29 -07:00
hci_nokia.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-16 15:37:53 -04:00
hci_qca.c Bluetooth: hci_qca: Enable ISO data packet RX 2025-07-23 10:25:19 -04:00
hci_serdev.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-16 15:37:53 -04:00
hci_uart.h Bluetooth: hci_uart: Fix another race during initialization 2025-03-25 12:32:15 -04:00
hci_vhci.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-16 15:37:53 -04:00
Kconfig Revert "Bluetooth: btusb: Configure altsetting for HCI_USER_CHANNEL" 2025-05-21 10:28:08 -04:00
Makefile Bluetooth: hci_uart: Add support for Amlogic HCI UART 2024-09-10 12:44:10 -04:00
virtio_bt.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-16 15:37:53 -04:00