Skip to content

Commit 2469bb6

Browse files
Baochen Qiangjeff-t-johnson
authored andcommitted
Revert "wifi: ath10k: avoid unnecessary wait for service ready message"
This reverts commit 51a73f1. 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: 51a73f1 ("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> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20251027-ath10k-revert-polling-first-change-v1-1-89aaf3bcbfa1@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
1 parent a83155c commit 2469bb6

1 file changed

Lines changed: 20 additions & 19 deletions

File tree

  • drivers/net/wireless/ath/ath10k

drivers/net/wireless/ath/ath10k/wmi.c

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,32 +1764,33 @@ void ath10k_wmi_put_wmi_channel(struct ath10k *ar, struct wmi_channel *ch,
17641764

17651765
int ath10k_wmi_wait_for_service_ready(struct ath10k *ar)
17661766
{
1767-
unsigned long timeout = jiffies + WMI_SERVICE_READY_TIMEOUT_HZ;
17681767
unsigned long time_left, i;
17691768

1770-
/* Sometimes the PCI HIF doesn't receive interrupt
1771-
* for the service ready message even if the buffer
1772-
* was completed. PCIe sniffer shows that it's
1773-
* because the corresponding CE ring doesn't fires
1774-
* it. Workaround here by polling CE rings. Since
1775-
* the message could arrive at any time, continue
1776-
* polling until timeout.
1777-
*/
1778-
do {
1769+
time_left = wait_for_completion_timeout(&ar->wmi.service_ready,
1770+
WMI_SERVICE_READY_TIMEOUT_HZ);
1771+
if (!time_left) {
1772+
/* Sometimes the PCI HIF doesn't receive interrupt
1773+
* for the service ready message even if the buffer
1774+
* was completed. PCIe sniffer shows that it's
1775+
* because the corresponding CE ring doesn't fires
1776+
* it. Workaround here by polling CE rings once.
1777+
*/
1778+
ath10k_warn(ar, "failed to receive service ready completion, polling..\n");
1779+
17791780
for (i = 0; i < CE_COUNT; i++)
17801781
ath10k_hif_send_complete_check(ar, i, 1);
17811782

1782-
/* The 100 ms granularity is a tradeoff considering scheduler
1783-
* overhead and response latency
1784-
*/
17851783
time_left = wait_for_completion_timeout(&ar->wmi.service_ready,
1786-
msecs_to_jiffies(100));
1787-
if (time_left)
1788-
return 0;
1789-
} while (time_before(jiffies, timeout));
1784+
WMI_SERVICE_READY_TIMEOUT_HZ);
1785+
if (!time_left) {
1786+
ath10k_warn(ar, "polling timed out\n");
1787+
return -ETIMEDOUT;
1788+
}
1789+
1790+
ath10k_warn(ar, "service ready completion received, continuing normally\n");
1791+
}
17901792

1791-
ath10k_warn(ar, "failed to receive service ready completion\n");
1792-
return -ETIMEDOUT;
1793+
return 0;
17931794
}
17941795

17951796
int ath10k_wmi_wait_for_unified_ready(struct ath10k *ar)

0 commit comments

Comments
 (0)