Commit 872274b
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]>1 parent b4f82f9 commit 872274b
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1320 | 1320 | | |
1321 | 1321 | | |
1322 | 1322 | | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
1323 | 1327 | | |
1324 | 1328 | | |
1325 | 1329 | | |
| |||
1357 | 1361 | | |
1358 | 1362 | | |
1359 | 1363 | | |
1360 | | - | |
1361 | 1364 | | |
1362 | 1365 | | |
1363 | 1366 | | |
| |||
0 commit comments