Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bluetooth: btintel_pcie: Fix a potential race condition
On HCI_OP_RESET command, firmware raises alive interrupt. Driver needs to wait for this before sending other command. This patch fixes the potential miss of alive interrupt due to which HCI_OP_RESET can timeout. Expected flow: If tx command is HCI_OP_RESET, 1. set data->gp0_received = false 2. send HCI_OP_RESET 3. wait for alive interrupt Actual flow having potential race: If tx command is HCI_OP_RESET, 1. send HCI_OP_RESET 1a. Firmware raises alive interrupt here and in ISR data->gp0_received is set to true 2. set data->gp0_received = false 3. wait for alive interrupt Signed-off-by: Kiran K <[email protected]> Fixes: 05c200c ("Bluetooth: btintel_pcie: Add handshake between driver and firmware") Reported-by: Bjorn Helgaas <[email protected]> Closes: https://patchwork.kernel.org/project/bluetooth/patch/[email protected]/ Signed-off-by: Luiz Augusto von Dentz <[email protected]>
- Loading branch information