aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorChandrashekar Devegowda <chandrashekar.devegowda@intel.com>2025-06-03 15:34:40 +0530
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2025-06-05 14:54:14 -0400
commitbf2ffc4d14db29cab781549912d2dc69127f4d3e (patch)
treedd79b906aeed2b697b5e69c7db0f74fffe6ff603
parentBluetooth: btintel_pcie: Increase the tx and rx descriptor count (diff)
downloadwireguard-linux-bf2ffc4d14db29cab781549912d2dc69127f4d3e.tar.xz
wireguard-linux-bf2ffc4d14db29cab781549912d2dc69127f4d3e.zip
Bluetooth: btintel_pcie: Reduce driver buffer posting to prevent race condition
Modify the driver to post 3 fewer buffers than the maximum rx buffers (64) allowed for the firmware. This change mitigates a hardware issue causing a race condition in the firmware, improving stability and data handling. Signed-off-by: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com> Signed-off-by: Kiran K <kiran.k@intel.com> Fixes: c2b636b3f788 ("Bluetooth: btintel_pcie: Add support for PCIe transport") Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
-rw-r--r--drivers/bluetooth/btintel_pcie.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 03f13de4a723..563165c5efae 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -398,7 +398,11 @@ static int btintel_pcie_start_rx(struct btintel_pcie_data *data)
int i, ret;
struct rxq *rxq = &data->rxq;
- for (i = 0; i < rxq->count; i++) {
+ /* Post (BTINTEL_PCIE_RX_DESCS_COUNT - 3) buffers to overcome the
+ * hardware issues leading to race condition at the firmware.
+ */
+
+ for (i = 0; i < rxq->count - 3; i++) {
ret = btintel_pcie_submit_rx(data);
if (ret)
return ret;