public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Kiran K <kiran.k@intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: ravishankar.srivatsa@intel.com, chethan.tumkur.narayan@intel.com,
	chandrashekar.devegowda@intel.com, vijay.satija@intel.com,
	Kiran K <kiran.k@intel.com>
Subject: [PATCH v2 3/3] Bluetooth: btintel_pcie: Reduce driver buffer posting to prevent race condition
Date: Sun,  1 Jun 2025 08:58:24 +0530	[thread overview]
Message-ID: <20250601032824.572001-3-kiran.k@intel.com> (raw)
In-Reply-To: <20250601032824.572001-1-kiran.k@intel.com>

From: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>

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>
---
changes from v1->v2:
- Add errata details

 drivers/bluetooth/btintel_pcie.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 03f13de4a723..780697880d59 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -398,7 +398,12 @@ 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++) {
+	/* WREQ-198603 - 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;
-- 
2.43.0


  parent reply	other threads:[~2025-06-01  3:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-01  3:28 [PATCH v2 1/3] Bluetooth: btintel_pcie: Fix driver not posting maximum rx buffers Kiran K
2025-06-01  3:28 ` [PATCH v2 2/3] Bluetooth: btintel_pcie: Increase the tx and rx descriptor count Kiran K
2025-06-01  3:28 ` Kiran K [this message]
2025-06-01  3:37 ` [v2,1/3] Bluetooth: btintel_pcie: Fix driver not posting maximum rx buffers bluez.test.bot
2025-06-03 14:50 ` [PATCH v2 1/3] " patchwork-bot+bluetooth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250601032824.572001-3-kiran.k@intel.com \
    --to=kiran.k@intel.com \
    --cc=chandrashekar.devegowda@intel.com \
    --cc=chethan.tumkur.narayan@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=ravishankar.srivatsa@intel.com \
    --cc=vijay.satija@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox