Skip to content

Commit 3b8694e

Browse files
committed
Merge tag 'ath-current-20251027' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath
Jeff Johnson says: ================== ath.git update for v6.18-rc4 Revert an ath10k change which improved QCA6174 but completely broke QCA988x and QCA9984. ================== Link: https://patch.msgid.link/e7e3ab9f-f477-4e84-8a5c-609fa1834624@oss.qualcomm.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2 parents a83155c + 2469bb6 commit 3b8694e

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)