Skip to content

Commit 057b6ca

Browse files
kirankrishnappa-intelVudentz
authored andcommitted
Bluetooth: btintel_pcie: Fix event packet loss issue
In the current btintel_pcie driver implementation, when an interrupt is received, the driver checks for the alive cause before the TX/RX cause. Handling the alive cause involves resetting the TX/RX queue indices. This flow works correctly when the causes are mutually exclusive. However, if both cause bits are set simultaneously, the alive cause resets the queue indices, resulting in an event packet drop and a command timeout. To fix this issue, the driver is modified to handle all other causes before checking for the alive cause. Test case: Issue is seen with stress reboot scenario - 50x run [20.337589] Bluetooth: hci0: Device revision is 0 [20.346750] Bluetooth: hci0: Secure boot is enabled [20.346752] Bluetooth: hci0: OTP lock is disabled [20.346752] Bluetooth: hci0: API lock is enabled [20.346752] Bluetooth: hci0: Debug lock is disabled [20.346753] Bluetooth: hci0: Minimum firmware build 1 week 10 2014 [20.346754] Bluetooth: hci0: Bootloader timestamp 2023.43 buildtype 1 build 11631 [20.359070] Bluetooth: hci0: Found device firmware: intel/ibt-00a0-00a1-iml.sfi [20.371499] Bluetooth: hci0: Boot Address: 0xb02ff800 [20.385769] Bluetooth: hci0: Firmware Version: 166-34.25 [20.538257] Bluetooth: hci0: Waiting for firmware download to complete [20.554424] Bluetooth: hci0: Firmware loaded in 178651 usecs [21.081588] Bluetooth: hci0: Timeout (500 ms) on tx completion [21.096541] Bluetooth: hci0: Failed to send frame (-62) [21.110240] Bluetooth: hci0: sending frame failed (-62) [21.138551] Bluetooth: hci0: Failed to send Intel Reset command [21.170153] Bluetooth: hci0: Intel Soft Reset failed (-62) Signed-off-by: Kiran K <kiran.k@intel.com> Signed-off-by: Sai Teja Aluvala <aluvala.sai.teja@intel.com> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Fixes: c2b636b ("Bluetooth: btintel_pcie: Add support for PCIe transport") Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
1 parent c403da5 commit 057b6ca

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

drivers/bluetooth/btintel_pcie.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,11 +1467,6 @@ static irqreturn_t btintel_pcie_irq_msix_handler(int irq, void *dev_id)
14671467
if (intr_hw & BTINTEL_PCIE_MSIX_HW_INT_CAUSES_GP1)
14681468
btintel_pcie_msix_gp1_handler(data);
14691469

1470-
/* This interrupt is triggered by the firmware after updating
1471-
* boot_stage register and image_response register
1472-
*/
1473-
if (intr_hw & BTINTEL_PCIE_MSIX_HW_INT_CAUSES_GP0)
1474-
btintel_pcie_msix_gp0_handler(data);
14751470

14761471
/* For TX */
14771472
if (intr_fh & BTINTEL_PCIE_MSIX_FH_INT_CAUSES_0) {
@@ -1487,6 +1482,12 @@ static irqreturn_t btintel_pcie_irq_msix_handler(int irq, void *dev_id)
14871482
btintel_pcie_msix_tx_handle(data);
14881483
}
14891484

1485+
/* This interrupt is triggered by the firmware after updating
1486+
* boot_stage register and image_response register
1487+
*/
1488+
if (intr_hw & BTINTEL_PCIE_MSIX_HW_INT_CAUSES_GP0)
1489+
btintel_pcie_msix_gp0_handler(data);
1490+
14901491
/*
14911492
* Before sending the interrupt the HW disables it to prevent a nested
14921493
* interrupt. This is done by writing 1 to the corresponding bit in

0 commit comments

Comments
 (0)