/[packages]/cauldron/kernel/current/PATCHES/patches/0080-ath10k-schedule-hardware-restart-if-WMI-command-time.patch
ViewVC logotype

Contents of /cauldron/kernel/current/PATCHES/patches/0080-ath10k-schedule-hardware-restart-if-WMI-command-time.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1329221 - (show annotations) (download)
Fri Nov 9 22:05:45 2018 UTC (5 years, 10 months ago) by tmb
File size: 2095 byte(s)
add fixes from sashas autosel queue
1 From 99cedb045e358f0169da2993e3503179d041359c Mon Sep 17 00:00:00 2001
2 From: Martin Willi <martin@strongswan.org>
3 Date: Wed, 22 Aug 2018 09:39:52 +0200
4 Subject: [PATCH 080/145] ath10k: schedule hardware restart if WMI command
5 times out
6
7 [ Upstream commit a9911937e7d332761e8c4fcbc7ba0426bdc3956f ]
8
9 When running in AP mode, ath10k sometimes suffers from TX credit
10 starvation. The issue is hard to reproduce and shows up once in a
11 few days, but has been repeatedly seen with QCA9882 and a large
12 range of firmwares, including 10.2.4.70.67.
13
14 Once the module is in this state, TX credits are never replenished,
15 which results in "SWBA overrun" errors, as no beacons can be sent.
16 Even worse, WMI commands run in a timeout while holding the conf
17 mutex for three seconds each, making any further operations slow
18 and the whole system unresponsive.
19
20 The firmware/driver never recovers from that state automatically,
21 and triggering TX flush or warm restarts won't work over WMI. So
22 issue a hardware restart if a WMI command times out due to missing
23 TX credits. This implies a connectivity outage of about 1.4s in AP
24 mode, but brings back the interface and the whole system to a usable
25 state. WMI command timeouts have not been seen in absent of this
26 specific issue, so taking such drastic actions seems legitimate.
27
28 Signed-off-by: Martin Willi <martin@strongswan.org>
29 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
30 Signed-off-by: Sasha Levin <sashal@kernel.org>
31 ---
32 drivers/net/wireless/ath/ath10k/wmi.c | 6 ++++++
33 1 file changed, 6 insertions(+)
34
35 diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
36 index 1dced0dae9cd..9f31b9a10850 100644
37 --- a/drivers/net/wireless/ath/ath10k/wmi.c
38 +++ b/drivers/net/wireless/ath/ath10k/wmi.c
39 @@ -1869,6 +1869,12 @@ int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id)
40 if (ret)
41 dev_kfree_skb_any(skb);
42
43 + if (ret == -EAGAIN) {
44 + ath10k_warn(ar, "wmi command %d timeout, restarting hardware\n",
45 + cmd_id);
46 + queue_work(ar->workqueue, &ar->restart_work);
47 + }
48 +
49 return ret;
50 }
51
52 --
53 2.19.1
54

  ViewVC Help
Powered by ViewVC 1.1.30