linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH ath-current] Revert "wifi: ath10k: avoid unnecessary wait for service ready message"
@ 2025-10-27  1:49 Baochen Qiang
  2025-10-27 14:17 ` Vasanthakumar Thiagarajan
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Baochen Qiang @ 2025-10-27  1:49 UTC (permalink / raw)
  To: Jeff Johnson
  Cc: klaus.kudielka, yannick.martin, andreas.tobler,
	mathias.kretschmer, linux-wireless, ath10k, Baochen Qiang

This reverts commit 51a73f1b2e56b0324b4a3bb8cebc4221b5be4c7a.

Although this commit benefits QCA6174, it breaks QCA988x and
QCA9984 [1][2]. Since it is not likely to root cause/fix this
issue in a short time, revert it to get those chips back.

Compile tested only.

Fixes: 51a73f1b2e56 ("wifi: ath10k: avoid unnecessary wait for service ready message")
Link: https://lore.kernel.org/ath10k/6d41bc00602c33ffbf68781f563ff2e6c6915a3e.camel@gmail.com # [1]
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220671 # [2]
Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/wmi.c | 39 ++++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 19 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index b3b00d324075bd1b82c76f2d93cf4e2a79ead769..b4aad6604d6d9d95b918d0a077f5d1511bc249ad 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -1764,32 +1764,33 @@ void ath10k_wmi_put_wmi_channel(struct ath10k *ar, struct wmi_channel *ch,
 
 int ath10k_wmi_wait_for_service_ready(struct ath10k *ar)
 {
-	unsigned long timeout = jiffies + WMI_SERVICE_READY_TIMEOUT_HZ;
 	unsigned long time_left, i;
 
-	/* Sometimes the PCI HIF doesn't receive interrupt
-	 * for the service ready message even if the buffer
-	 * was completed. PCIe sniffer shows that it's
-	 * because the corresponding CE ring doesn't fires
-	 * it. Workaround here by polling CE rings. Since
-	 * the message could arrive at any time, continue
-	 * polling until timeout.
-	 */
-	do {
+	time_left = wait_for_completion_timeout(&ar->wmi.service_ready,
+						WMI_SERVICE_READY_TIMEOUT_HZ);
+	if (!time_left) {
+		/* Sometimes the PCI HIF doesn't receive interrupt
+		 * for the service ready message even if the buffer
+		 * was completed. PCIe sniffer shows that it's
+		 * because the corresponding CE ring doesn't fires
+		 * it. Workaround here by polling CE rings once.
+		 */
+		ath10k_warn(ar, "failed to receive service ready completion, polling..\n");
+
 		for (i = 0; i < CE_COUNT; i++)
 			ath10k_hif_send_complete_check(ar, i, 1);
 
-		/* The 100 ms granularity is a tradeoff considering scheduler
-		 * overhead and response latency
-		 */
 		time_left = wait_for_completion_timeout(&ar->wmi.service_ready,
-							msecs_to_jiffies(100));
-		if (time_left)
-			return 0;
-	} while (time_before(jiffies, timeout));
+							WMI_SERVICE_READY_TIMEOUT_HZ);
+		if (!time_left) {
+			ath10k_warn(ar, "polling timed out\n");
+			return -ETIMEDOUT;
+		}
+
+		ath10k_warn(ar, "service ready completion received, continuing normally\n");
+	}
 
-	ath10k_warn(ar, "failed to receive service ready completion\n");
-	return -ETIMEDOUT;
+	return 0;
 }
 
 int ath10k_wmi_wait_for_unified_ready(struct ath10k *ar)

---
base-commit: d5d9da878287cb30199defc6941b695f33f9236b
change-id: 20251024-ath10k-revert-polling-first-change-2add89f0fd15

Best regards,
-- 
Baochen Qiang <baochen.qiang@oss.qualcomm.com>


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH ath-current] Revert "wifi: ath10k: avoid unnecessary wait for service ready message"
  2025-10-27  1:49 [PATCH ath-current] Revert "wifi: ath10k: avoid unnecessary wait for service ready message" Baochen Qiang
@ 2025-10-27 14:17 ` Vasanthakumar Thiagarajan
  2025-10-27 14:36 ` Jeff Johnson
  2025-10-27 17:50 ` Klaus Kudielka
  2 siblings, 0 replies; 5+ messages in thread
From: Vasanthakumar Thiagarajan @ 2025-10-27 14:17 UTC (permalink / raw)
  To: Baochen Qiang, Jeff Johnson
  Cc: klaus.kudielka, yannick.martin, andreas.tobler,
	mathias.kretschmer, linux-wireless, ath10k



On 10/27/2025 7:19 AM, Baochen Qiang wrote:
> This reverts commit 51a73f1b2e56b0324b4a3bb8cebc4221b5be4c7a.
> 
> Although this commit benefits QCA6174, it breaks QCA988x and
> QCA9984 [1][2]. Since it is not likely to root cause/fix this
> issue in a short time, revert it to get those chips back.
> 
> Compile tested only.
> 
> Fixes: 51a73f1b2e56 ("wifi: ath10k: avoid unnecessary wait for service ready message")
> Link: https://lore.kernel.org/ath10k/6d41bc00602c33ffbf68781f563ff2e6c6915a3e.camel@gmail.com # [1]
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220671 # [2]
> Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>

Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH ath-current] Revert "wifi: ath10k: avoid unnecessary wait for service ready message"
  2025-10-27  1:49 [PATCH ath-current] Revert "wifi: ath10k: avoid unnecessary wait for service ready message" Baochen Qiang
  2025-10-27 14:17 ` Vasanthakumar Thiagarajan
@ 2025-10-27 14:36 ` Jeff Johnson
  2025-10-27 17:50 ` Klaus Kudielka
  2 siblings, 0 replies; 5+ messages in thread
From: Jeff Johnson @ 2025-10-27 14:36 UTC (permalink / raw)
  To: Jeff Johnson, Baochen Qiang
  Cc: klaus.kudielka, yannick.martin, andreas.tobler,
	mathias.kretschmer, linux-wireless, ath10k


On Mon, 27 Oct 2025 09:49:12 +0800, Baochen Qiang wrote:
> This reverts commit 51a73f1b2e56b0324b4a3bb8cebc4221b5be4c7a.
> 
> Although this commit benefits QCA6174, it breaks QCA988x and
> QCA9984 [1][2]. Since it is not likely to root cause/fix this
> issue in a short time, revert it to get those chips back.
> 
> Compile tested only.
> 
> [...]

Applied, thanks!

[1/1] Revert "wifi: ath10k: avoid unnecessary wait for service ready message"
      commit: 2469bb6a6af944755a7d7daf66be90f3b8decbf9

Best regards,
-- 
Jeff Johnson <jeff.johnson@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH ath-current] Revert "wifi: ath10k: avoid unnecessary wait for service ready message"
  2025-10-27  1:49 [PATCH ath-current] Revert "wifi: ath10k: avoid unnecessary wait for service ready message" Baochen Qiang
  2025-10-27 14:17 ` Vasanthakumar Thiagarajan
  2025-10-27 14:36 ` Jeff Johnson
@ 2025-10-27 17:50 ` Klaus Kudielka
  2025-10-29 20:56   ` Kretschmer, Mathias
  2 siblings, 1 reply; 5+ messages in thread
From: Klaus Kudielka @ 2025-10-27 17:50 UTC (permalink / raw)
  To: Baochen Qiang, Jeff Johnson
  Cc: yannick.martin, andreas.tobler, mathias.kretschmer,
	linux-wireless, ath10k

On Mon, 2025-10-27 at 09:49 +0800, Baochen Qiang wrote:
> This reverts commit 51a73f1b2e56b0324b4a3bb8cebc4221b5be4c7a.
> 
> Although this commit benefits QCA6174, it breaks QCA988x and
> QCA9984 [1][2]. Since it is not likely to root cause/fix this
> issue in a short time, revert it to get those chips back.
> 
> Compile tested only.

With this patch on top of v6.18-rc3, the following device works again:

02:00.0 Network controller: Qualcomm Atheros QCA986x/988x 802.11ac Wireless Network Adapter

Tested-by: Klaus Kudielka <klaus.kudielka@gmail.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH ath-current] Revert "wifi: ath10k: avoid unnecessary wait for service ready message"
  2025-10-27 17:50 ` Klaus Kudielka
@ 2025-10-29 20:56   ` Kretschmer, Mathias
  0 siblings, 0 replies; 5+ messages in thread
From: Kretschmer, Mathias @ 2025-10-29 20:56 UTC (permalink / raw)
  To: baochen.qiang@oss.qualcomm.com, jjohnson@kernel.org,
	klaus.kudielka@gmail.com
  Cc: andreas.tobler@onway.ch, yannick.martin@okazoo.eu,
	ath10k@lists.infradead.org, linux-wireless@vger.kernel.org

On Mon, 2025-10-27 at 18:50 +0100, Klaus Kudielka wrote:
> On Mon, 2025-10-27 at 09:49 +0800, Baochen Qiang wrote:
> > This reverts commit 51a73f1b2e56b0324b4a3bb8cebc4221b5be4c7a.
> > 
> > Although this commit benefits QCA6174, it breaks QCA988x and
> > QCA9984 [1][2]. Since it is not likely to root cause/fix this
> > issue in a short time, revert it to get those chips back.
> > 
> > Compile tested only.
> 
> With this patch on top of v6.18-rc3, the following device works again:
> 
> 02:00.0 Network controller: Qualcomm Atheros QCA986x/988x 802.11ac Wireless
> Network Adapter
> 
> Tested-by: Klaus Kudielka <klaus.kudielka@gmail.com>

6.12.56 + this patch bring this device back to life:

02:00.0 Network controller: Qualcomm Atheros QCA988x 802.11ac Wireless Network
Adapter

Tested-by: Mathias Kretschmer <mathias.kretschmer@fit.fraunhofer.de>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-29 20:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-27  1:49 [PATCH ath-current] Revert "wifi: ath10k: avoid unnecessary wait for service ready message" Baochen Qiang
2025-10-27 14:17 ` Vasanthakumar Thiagarajan
2025-10-27 14:36 ` Jeff Johnson
2025-10-27 17:50 ` Klaus Kudielka
2025-10-29 20:56   ` Kretschmer, Mathias

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).