linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] ath10k: recovery improvements 2014-05-09
@ 2014-05-09 12:35 Michal Kazior
  2014-05-09 12:35 ` [PATCH 1/7] ath10k: move restart_work call Michal Kazior
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Michal Kazior @ 2014-05-09 12:35 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

Hi,

This depends on my `ath10k: recovery fixes
2014-05-09`.

Hopefully the split makes it a little saner to
review.

Please note: `ath10k: make wmi timeout trigger hw
restart` effectively hides the mgmt tx / htc
credit starvation issue that was discussed
recently. My intention is to make the driver more
robust and as a side effect it makes the
starvation issue less painful. If desired so
the patch can be easily ignored in the series as
nothing depends on it.


Michal Kazior (7):
  ath10k: move restart_work call
  ath10k: introduce core restart symbol
  ath10k: drain wmi quickly upon hw restart
  ath10k: wake up everything on core restart
  ath10k: reduce timeout values
  ath10k: make wmi timeout trigger hw restart
  ath10k: remove old unused defines

 drivers/net/wireless/ath/ath10k/core.c | 27 +++++++++++++++++++++++++--
 drivers/net/wireless/ath/ath10k/core.h |  7 +++++--
 drivers/net/wireless/ath/ath10k/htt.c  |  2 +-
 drivers/net/wireless/ath/ath10k/mac.c  |  8 +++-----
 drivers/net/wireless/ath/ath10k/pci.c  |  3 +--
 drivers/net/wireless/ath/ath10k/txrx.c |  2 +-
 drivers/net/wireless/ath/ath10k/wmi.c  | 17 ++++++++++++++++-
 drivers/net/wireless/ath/ath10k/wmi.h  |  4 ++--
 8 files changed, 54 insertions(+), 16 deletions(-)

-- 
1.8.5.3


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

* [PATCH 1/7] ath10k: move restart_work call
  2014-05-09 12:35 [PATCH 0/7] ath10k: recovery improvements 2014-05-09 Michal Kazior
@ 2014-05-09 12:35 ` Michal Kazior
  2014-05-09 12:35 ` [PATCH 2/7] ath10k: introduce core restart symbol Michal Kazior
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Michal Kazior @ 2014-05-09 12:35 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

That call really should not be in
ath10k_pci_hif_dump_area(). It's very misleading
to have a function name which implies just
printing stuff but actually also restarts
firmware.

Suggested-By: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/pci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 66b1f30..438d3cf 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -864,8 +864,6 @@ static void ath10k_pci_hif_dump_area(struct ath10k *ar)
 			   reg_dump_values[i + 1],
 			   reg_dump_values[i + 2],
 			   reg_dump_values[i + 3]);
-
-	queue_work(ar->workqueue, &ar->restart_work);
 }
 
 static void ath10k_pci_hif_send_complete_check(struct ath10k *ar, u8 pipe,
@@ -1790,6 +1788,7 @@ static void ath10k_pci_fw_interrupt_handler(struct ath10k *ar)
 
 		if (ar_pci->started) {
 			ath10k_pci_hif_dump_area(ar);
+			queue_work(ar->workqueue, &ar->restart_work);
 		} else {
 			/*
 			 * Probable Target failure before we're prepared
-- 
1.8.5.3


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

* [PATCH 2/7] ath10k: introduce core restart symbol
  2014-05-09 12:35 [PATCH 0/7] ath10k: recovery improvements 2014-05-09 Michal Kazior
  2014-05-09 12:35 ` [PATCH 1/7] ath10k: move restart_work call Michal Kazior
@ 2014-05-09 12:35 ` Michal Kazior
  2014-05-09 12:35 ` [PATCH 3/7] ath10k: drain wmi quickly upon hw restart Michal Kazior
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Michal Kazior @ 2014-05-09 12:35 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

This makes it easier to have an extra preparation
code before restart work is scheduled.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 10 ++++++++--
 drivers/net/wireless/ath/ath10k/core.h |  1 +
 drivers/net/wireless/ath/ath10k/pci.c  |  2 +-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 7034c72..acc22cc 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -672,7 +672,7 @@ static int ath10k_init_hw_params(struct ath10k *ar)
 	return 0;
 }
 
-static void ath10k_core_restart(struct work_struct *work)
+static void ath10k_core_restart_work(struct work_struct *work)
 {
 	struct ath10k *ar = container_of(work, struct ath10k, restart_work);
 
@@ -704,6 +704,12 @@ static void ath10k_core_restart(struct work_struct *work)
 	mutex_unlock(&ar->conf_mutex);
 }
 
+void ath10k_core_restart(struct ath10k *ar)
+{
+	queue_work(ar->workqueue, &ar->restart_work);
+}
+EXPORT_SYMBOL(ath10k_core_restart);
+
 struct ath10k *ath10k_core_create(void *hif_priv, struct device *dev,
 				  const struct ath10k_hif_ops *hif_ops)
 {
@@ -749,7 +755,7 @@ struct ath10k *ath10k_core_create(void *hif_priv, struct device *dev,
 	INIT_WORK(&ar->wmi_mgmt_tx_work, ath10k_mgmt_over_wmi_tx_work);
 	skb_queue_head_init(&ar->wmi_mgmt_tx_queue);
 
-	INIT_WORK(&ar->restart_work, ath10k_core_restart);
+	INIT_WORK(&ar->restart_work, ath10k_core_restart_work);
 
 	return ar;
 
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 2c1dfd7..170094d 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -494,5 +494,6 @@ int ath10k_wait_for_suspend(struct ath10k *ar, u32 suspend_opt);
 void ath10k_core_stop(struct ath10k *ar);
 int ath10k_core_register(struct ath10k *ar, u32 chip_id);
 void ath10k_core_unregister(struct ath10k *ar);
+void ath10k_core_restart(struct ath10k *ar);
 
 #endif /* _CORE_H_ */
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 438d3cf..7be5784 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -1788,7 +1788,7 @@ static void ath10k_pci_fw_interrupt_handler(struct ath10k *ar)
 
 		if (ar_pci->started) {
 			ath10k_pci_hif_dump_area(ar);
-			queue_work(ar->workqueue, &ar->restart_work);
+			ath10k_core_restart(ar);
 		} else {
 			/*
 			 * Probable Target failure before we're prepared
-- 
1.8.5.3


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

* [PATCH 3/7] ath10k: drain wmi quickly upon hw restart
  2014-05-09 12:35 [PATCH 0/7] ath10k: recovery improvements 2014-05-09 Michal Kazior
  2014-05-09 12:35 ` [PATCH 1/7] ath10k: move restart_work call Michal Kazior
  2014-05-09 12:35 ` [PATCH 2/7] ath10k: introduce core restart symbol Michal Kazior
@ 2014-05-09 12:35 ` Michal Kazior
  2014-05-09 12:35 ` [PATCH 4/7] ath10k: wake up everything on core restart Michal Kazior
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Michal Kazior @ 2014-05-09 12:35 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

Once restart is started it doesn't make much sense
to process pending requests. Just drop all WMI
commands that are in progress.

This speeds up hw restart because conf_mutex can
be held in some cases while a crash happens. In
that case WMI tx credits are no replenished and 3
second timeout for each WMI command happens. This
could add up to quite a lot.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c |  5 +++++
 drivers/net/wireless/ath/ath10k/core.h |  3 +++
 drivers/net/wireless/ath/ath10k/wmi.c  | 12 +++++++++++-
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index acc22cc..3f4d28f 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -706,6 +706,11 @@ static void ath10k_core_restart_work(struct work_struct *work)
 
 void ath10k_core_restart(struct ath10k *ar)
 {
+	spin_lock_bh(&ar->data_lock);
+	ar->wmi.drop = true;
+	wake_up(&ar->wmi.tx_credits_wq);
+	spin_unlock_bh(&ar->data_lock);
+
 	queue_work(ar->workqueue, &ar->restart_work);
 }
 EXPORT_SYMBOL(ath10k_core_restart);
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 170094d..074cb41 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -113,6 +113,9 @@ struct ath10k_wmi {
 
 	u32 num_mem_chunks;
 	struct ath10k_mem_chunk mem_chunks[ATH10K_MAX_MEM_REQS];
+
+	/* protected by ar->data_lock. used to speed up hw restart */
+	bool drop;
 };
 
 struct ath10k_peer_stat {
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 72cc4f2..159d744 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -621,7 +621,13 @@ static int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb,
 		/* try to send pending beacons first. they take priority */
 		ath10k_wmi_tx_beacons_nowait(ar);
 
-		ret = ath10k_wmi_cmd_send_nowait(ar, skb, cmd_id);
+		spin_lock_bh(&ar->data_lock);
+		if (ar->wmi.drop)
+			ret = -EPERM;
+		else
+			ret = ath10k_wmi_cmd_send_nowait(ar, skb, cmd_id);
+		spin_unlock_bh(&ar->data_lock);
+
 		(ret != -EAGAIN);
 	}), 3*HZ);
 
@@ -2341,6 +2347,10 @@ int ath10k_wmi_attach(struct ath10k *ar)
 	init_completion(&ar->wmi.unified_ready);
 	init_waitqueue_head(&ar->wmi.tx_credits_wq);
 
+	spin_lock_bh(&ar->data_lock);
+	ar->wmi.drop = false;
+	spin_unlock_bh(&ar->data_lock);
+
 	return 0;
 }
 
-- 
1.8.5.3


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

* [PATCH 4/7] ath10k: wake up everything on core restart
  2014-05-09 12:35 [PATCH 0/7] ath10k: recovery improvements 2014-05-09 Michal Kazior
                   ` (2 preceding siblings ...)
  2014-05-09 12:35 ` [PATCH 3/7] ath10k: drain wmi quickly upon hw restart Michal Kazior
@ 2014-05-09 12:35 ` Michal Kazior
  2014-05-15 13:21   ` Kalle Valo
  2014-05-09 12:35 ` [PATCH 5/7] ath10k: reduce timeout values Michal Kazior
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 14+ messages in thread
From: Michal Kazior @ 2014-05-09 12:35 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

It makes sense to finish completions as they may
be waited for while holding conf_mutex thus
delaying hw restart.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 3f4d28f..bf7c323 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -709,6 +709,18 @@ void ath10k_core_restart(struct ath10k *ar)
 	spin_lock_bh(&ar->data_lock);
 	ar->wmi.drop = true;
 	wake_up(&ar->wmi.tx_credits_wq);
+
+	complete(&ar->target_suspend);
+	complete(&ar->debug.event_stats_compl);
+	complete(&ar->htt.target_version_received);
+	complete(&ar->install_key_done);
+	complete(&ar->offchan_tx_completed);
+	complete(&ar->scan.started);
+	complete(&ar->scan.on_channel);
+	complete(&ar->vdev_setup_done);
+	complete(&ar->wmi.service_ready);
+	complete(&ar->wmi.unified_ready);
+	complete_all(&ar->scan.completed);
 	spin_unlock_bh(&ar->data_lock);
 
 	queue_work(ar->workqueue, &ar->restart_work);
-- 
1.8.5.3


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

* [PATCH 5/7] ath10k: reduce timeout values
  2014-05-09 12:35 [PATCH 0/7] ath10k: recovery improvements 2014-05-09 Michal Kazior
                   ` (3 preceding siblings ...)
  2014-05-09 12:35 ` [PATCH 4/7] ath10k: wake up everything on core restart Michal Kazior
@ 2014-05-09 12:35 ` Michal Kazior
  2014-05-09 12:35 ` [PATCH 6/7] ath10k: make wmi timeout trigger hw restart Michal Kazior
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Michal Kazior @ 2014-05-09 12:35 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

It doesn't make much sense to wait more than 1
second in most cases.

This speeds up teardown in some failcases.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.h | 2 +-
 drivers/net/wireless/ath/ath10k/htt.c  | 2 +-
 drivers/net/wireless/ath/ath10k/mac.c  | 6 +++---
 drivers/net/wireless/ath/ath10k/txrx.c | 2 +-
 drivers/net/wireless/ath/ath10k/wmi.h  | 4 ++--
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 074cb41..01f1830 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -221,7 +221,7 @@ struct ath10k_sta {
 	struct work_struct update_wk;
 };
 
-#define ATH10K_VDEV_SETUP_TIMEOUT_HZ (5*HZ)
+#define ATH10K_VDEV_SETUP_TIMEOUT_HZ (1*HZ)
 
 struct ath10k_vif {
 	struct list_head list;
diff --git a/drivers/net/wireless/ath/ath10k/htt.c b/drivers/net/wireless/ath/ath10k/htt.c
index 69697af5..60ea5f1 100644
--- a/drivers/net/wireless/ath/ath10k/htt.c
+++ b/drivers/net/wireless/ath/ath10k/htt.c
@@ -100,7 +100,7 @@ err_htc_attach:
 	return ret;
 }
 
-#define HTT_TARGET_VERSION_TIMEOUT_HZ (3*HZ)
+#define HTT_TARGET_VERSION_TIMEOUT_HZ (1*HZ)
 
 static int ath10k_htt_verify_version(struct ath10k_htt *htt)
 {
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 9b14ec8..9e3b16f 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -98,7 +98,7 @@ static int ath10k_install_key(struct ath10k_vif *arvif,
 	if (ret)
 		return ret;
 
-	ret = wait_for_completion_timeout(&ar->install_key_done, 3*HZ);
+	ret = wait_for_completion_timeout(&ar->install_key_done, 1*HZ);
 	if (ret == 0)
 		return -ETIMEDOUT;
 
@@ -2190,7 +2190,7 @@ static int ath10k_abort_scan(struct ath10k *ar)
 		return -EIO;
 	}
 
-	ret = wait_for_completion_timeout(&ar->scan.completed, 3*HZ);
+	ret = wait_for_completion_timeout(&ar->scan.completed, 1*HZ);
 	if (ret == 0)
 		ath10k_warn("timed out while waiting for scan to stop\n");
 
@@ -3604,7 +3604,7 @@ static int ath10k_remain_on_channel(struct ieee80211_hw *hw,
 		goto exit;
 	}
 
-	ret = wait_for_completion_timeout(&ar->scan.on_channel, 3*HZ);
+	ret = wait_for_completion_timeout(&ar->scan.on_channel, 1*HZ);
 	if (ret == 0) {
 		ath10k_warn("failed to switch to channel for roc scan\n");
 		ath10k_abort_scan(ar);
diff --git a/drivers/net/wireless/ath/ath10k/txrx.c b/drivers/net/wireless/ath/ath10k/txrx.c
index 82669a7..9007f2e 100644
--- a/drivers/net/wireless/ath/ath10k/txrx.c
+++ b/drivers/net/wireless/ath/ath10k/txrx.c
@@ -146,7 +146,7 @@ static int ath10k_wait_for_peer_common(struct ath10k *ar, int vdev_id,
 			spin_unlock_bh(&ar->data_lock);
 
 			mapped == expect_mapped;
-		}), 3*HZ);
+		}), 1*HZ);
 
 	if (ret <= 0)
 		return -ETIMEDOUT;
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index ae83822..772dbb6 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -1162,8 +1162,8 @@ struct wmi_service_ready_event_10x {
 } __packed;
 
 
-#define WMI_SERVICE_READY_TIMEOUT_HZ (5*HZ)
-#define WMI_UNIFIED_READY_TIMEOUT_HZ (5*HZ)
+#define WMI_SERVICE_READY_TIMEOUT_HZ (1*HZ)
+#define WMI_UNIFIED_READY_TIMEOUT_HZ (1*HZ)
 
 struct wmi_ready_event {
 	__le32 sw_version;
-- 
1.8.5.3


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

* [PATCH 6/7] ath10k: make wmi timeout trigger hw restart
  2014-05-09 12:35 [PATCH 0/7] ath10k: recovery improvements 2014-05-09 Michal Kazior
                   ` (4 preceding siblings ...)
  2014-05-09 12:35 ` [PATCH 5/7] ath10k: reduce timeout values Michal Kazior
@ 2014-05-09 12:35 ` Michal Kazior
  2014-05-09 12:35 ` [PATCH 7/7] ath10k: remove old unused defines Michal Kazior
  2014-05-12  7:34 ` [PATCH 0/7] ath10k: recovery improvements 2014-05-09 Michal Kazior
  7 siblings, 0 replies; 14+ messages in thread
From: Michal Kazior @ 2014-05-09 12:35 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

If tx credits aren't replenished for too long
firmware and driver state get out of sync. It
doesn't matter if firmware recovers a little later
on its own since by then it's already too late.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/wmi.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 159d744..e33c811 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -634,6 +634,11 @@ static int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb,
 	if (ret)
 		dev_kfree_skb_any(skb);
 
+	if (ret == -EAGAIN) {
+		/* no credits for 3 seconds means fw is practically dead */
+		ath10k_core_restart(ar);
+	}
+
 	return ret;
 }
 
-- 
1.8.5.3


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

* [PATCH 7/7] ath10k: remove old unused defines
  2014-05-09 12:35 [PATCH 0/7] ath10k: recovery improvements 2014-05-09 Michal Kazior
                   ` (5 preceding siblings ...)
  2014-05-09 12:35 ` [PATCH 6/7] ath10k: make wmi timeout trigger hw restart Michal Kazior
@ 2014-05-09 12:35 ` Michal Kazior
  2014-05-12  7:34 ` [PATCH 0/7] ath10k: recovery improvements 2014-05-09 Michal Kazior
  7 siblings, 0 replies; 14+ messages in thread
From: Michal Kazior @ 2014-05-09 12:35 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

These aren't used anywhere anymore.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.h | 1 -
 drivers/net/wireless/ath/ath10k/mac.c  | 2 --
 2 files changed, 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 01f1830..1128b5d 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -37,7 +37,6 @@
 #define WO(_f)      ((_f##_OFFSET) >> 2)
 
 #define ATH10K_SCAN_ID 0
-#define WMI_READY_TIMEOUT (5 * HZ)
 #define ATH10K_FLUSH_TIMEOUT_HZ (5*HZ)
 #define ATH10K_NUM_CHANS 38
 
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 9e3b16f..e9608e7 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3551,8 +3551,6 @@ exit:
 	return ret;
 }
 
-#define ATH10K_ROC_TIMEOUT_HZ (2*HZ)
-
 static int ath10k_remain_on_channel(struct ieee80211_hw *hw,
 				    struct ieee80211_vif *vif,
 				    struct ieee80211_channel *chan,
-- 
1.8.5.3


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

* Re: [PATCH 0/7] ath10k: recovery improvements 2014-05-09
  2014-05-09 12:35 [PATCH 0/7] ath10k: recovery improvements 2014-05-09 Michal Kazior
                   ` (6 preceding siblings ...)
  2014-05-09 12:35 ` [PATCH 7/7] ath10k: remove old unused defines Michal Kazior
@ 2014-05-12  7:34 ` Michal Kazior
  2014-05-14 13:34   ` Kalle Valo
  7 siblings, 1 reply; 14+ messages in thread
From: Michal Kazior @ 2014-05-12  7:34 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

On 9 May 2014 14:35, Michal Kazior <michal.kazior@tieto.com> wrote:
> Hi,
>
> This depends on my `ath10k: recovery fixes
> 2014-05-09`.
>
> Hopefully the split makes it a little saner to
> review.
>
> Please note: `ath10k: make wmi timeout trigger hw
> restart` effectively hides the mgmt tx / htc
> credit starvation issue that was discussed
> recently. My intention is to make the driver more
> robust and as a side effect it makes the
> starvation issue less painful. If desired so
> the patch can be easily ignored in the series as
> nothing depends on it.
>
>
> Michal Kazior (7):
>   ath10k: move restart_work call
>   ath10k: introduce core restart symbol


>   ath10k: drain wmi quickly upon hw restart
>   ath10k: wake up everything on core restart

These 2 are harmful as they are. In case of early fw crash
uninitialized structures are accessed. I'll re-spin later.


Michał

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

* Re: [PATCH 0/7] ath10k: recovery improvements 2014-05-09
  2014-05-12  7:34 ` [PATCH 0/7] ath10k: recovery improvements 2014-05-09 Michal Kazior
@ 2014-05-14 13:34   ` Kalle Valo
  2014-05-14 13:43     ` Michal Kazior
  0 siblings, 1 reply; 14+ messages in thread
From: Kalle Valo @ 2014-05-14 13:34 UTC (permalink / raw)
  To: Michal Kazior; +Cc: ath10k, linux-wireless

Michal Kazior <michal.kazior@tieto.com> writes:

> On 9 May 2014 14:35, Michal Kazior <michal.kazior@tieto.com> wrote:
>> Hi,
>>
>> This depends on my `ath10k: recovery fixes
>> 2014-05-09`.
>>
>> Hopefully the split makes it a little saner to
>> review.
>>
>> Please note: `ath10k: make wmi timeout trigger hw
>> restart` effectively hides the mgmt tx / htc
>> credit starvation issue that was discussed
>> recently. My intention is to make the driver more
>> robust and as a side effect it makes the
>> starvation issue less painful. If desired so
>> the patch can be easily ignored in the series as
>> nothing depends on it.
>>
>>
>> Michal Kazior (7):
>>   ath10k: move restart_work call
>>   ath10k: introduce core restart symbol
>
>
>>   ath10k: drain wmi quickly upon hw restart
>>   ath10k: wake up everything on core restart
>
> These 2 are harmful as they are. In case of early fw crash
> uninitialized structures are accessed. I'll re-spin later.

So I can drop the whole series, right?

-- 
Kalle Valo

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

* Re: [PATCH 0/7] ath10k: recovery improvements 2014-05-09
  2014-05-14 13:34   ` Kalle Valo
@ 2014-05-14 13:43     ` Michal Kazior
  2014-05-14 13:54       ` Kalle Valo
  0 siblings, 1 reply; 14+ messages in thread
From: Michal Kazior @ 2014-05-14 13:43 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath10k, linux-wireless

On 14 May 2014 15:34, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Michal Kazior <michal.kazior@tieto.com> writes:
>
>> On 9 May 2014 14:35, Michal Kazior <michal.kazior@tieto.com> wrote:
>>> Hi,
>>>
>>> This depends on my `ath10k: recovery fixes
>>> 2014-05-09`.
>>>
>>> Hopefully the split makes it a little saner to
>>> review.
>>>
>>> Please note: `ath10k: make wmi timeout trigger hw
>>> restart` effectively hides the mgmt tx / htc
>>> credit starvation issue that was discussed
>>> recently. My intention is to make the driver more
>>> robust and as a side effect it makes the
>>> starvation issue less painful. If desired so
>>> the patch can be easily ignored in the series as
>>> nothing depends on it.
>>>
>>>
>>> Michal Kazior (7):
>>>   ath10k: move restart_work call
>>>   ath10k: introduce core restart symbol
>>
>>
>>>   ath10k: drain wmi quickly upon hw restart
>>>   ath10k: wake up everything on core restart
>>
>> These 2 are harmful as they are. In case of early fw crash
>> uninitialized structures are accessed. I'll re-spin later.
>
> So I can drop the whole series, right?

Correct.


Michał

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

* Re: [PATCH 0/7] ath10k: recovery improvements 2014-05-09
  2014-05-14 13:43     ` Michal Kazior
@ 2014-05-14 13:54       ` Kalle Valo
  0 siblings, 0 replies; 14+ messages in thread
From: Kalle Valo @ 2014-05-14 13:54 UTC (permalink / raw)
  To: Michal Kazior; +Cc: ath10k, linux-wireless

Michal Kazior <michal.kazior@tieto.com> writes:

> On 14 May 2014 15:34, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
>> Michal Kazior <michal.kazior@tieto.com> writes:
>>
>>> On 9 May 2014 14:35, Michal Kazior <michal.kazior@tieto.com> wrote:
>>>> Hi,
>>>>
>>>> This depends on my `ath10k: recovery fixes
>>>> 2014-05-09`.
>>>>
>>>> Hopefully the split makes it a little saner to
>>>> review.
>>>>
>>>> Please note: `ath10k: make wmi timeout trigger hw
>>>> restart` effectively hides the mgmt tx / htc
>>>> credit starvation issue that was discussed
>>>> recently. My intention is to make the driver more
>>>> robust and as a side effect it makes the
>>>> starvation issue less painful. If desired so
>>>> the patch can be easily ignored in the series as
>>>> nothing depends on it.
>>>>
>>>>
>>>> Michal Kazior (7):
>>>>   ath10k: move restart_work call
>>>>   ath10k: introduce core restart symbol
>>>
>>>
>>>>   ath10k: drain wmi quickly upon hw restart
>>>>   ath10k: wake up everything on core restart
>>>
>>> These 2 are harmful as they are. In case of early fw crash
>>> uninitialized structures are accessed. I'll re-spin later.
>>
>> So I can drop the whole series, right?
>
> Correct.

Thanks. I dropped the series from my queue now.

-- 
Kalle Valo

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

* Re: [PATCH 4/7] ath10k: wake up everything on core restart
  2014-05-09 12:35 ` [PATCH 4/7] ath10k: wake up everything on core restart Michal Kazior
@ 2014-05-15 13:21   ` Kalle Valo
  2014-05-19  6:17     ` Michal Kazior
  0 siblings, 1 reply; 14+ messages in thread
From: Kalle Valo @ 2014-05-15 13:21 UTC (permalink / raw)
  To: Michal Kazior; +Cc: ath10k, linux-wireless

Michal Kazior <michal.kazior@tieto.com> writes:

> It makes sense to finish completions as they may
> be waited for while holding conf_mutex thus
> delaying hw restart.
>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
> ---
>  drivers/net/wireless/ath/ath10k/core.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
> index 3f4d28f..bf7c323 100644
> --- a/drivers/net/wireless/ath/ath10k/core.c
> +++ b/drivers/net/wireless/ath/ath10k/core.c
> @@ -709,6 +709,18 @@ void ath10k_core_restart(struct ath10k *ar)
>  	spin_lock_bh(&ar->data_lock);
>  	ar->wmi.drop = true;
>  	wake_up(&ar->wmi.tx_credits_wq);
> +
> +	complete(&ar->target_suspend);
> +	complete(&ar->debug.event_stats_compl);

We dropped this patchset already, but for the future, this patch
introduces a new warning:

   drivers/net/wireless/ath/ath10k/core.c: In function 'ath10k_core_restart':
>> drivers/net/wireless/ath/ath10k/core.c:714:14: error: 'struct ath10k'
>> has no member named 'debug'
     complete(&ar->debug.event_stats_compl);
                 ^

Maybe that complete call should be in debug.c?

-- 
Kalle Valo

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

* Re: [PATCH 4/7] ath10k: wake up everything on core restart
  2014-05-15 13:21   ` Kalle Valo
@ 2014-05-19  6:17     ` Michal Kazior
  0 siblings, 0 replies; 14+ messages in thread
From: Michal Kazior @ 2014-05-19  6:17 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath10k, linux-wireless

On 15 May 2014 15:21, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Michal Kazior <michal.kazior@tieto.com> writes:
>
>> It makes sense to finish completions as they may
>> be waited for while holding conf_mutex thus
>> delaying hw restart.
>>
>> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
>> ---
>>  drivers/net/wireless/ath/ath10k/core.c | 12 ++++++++++++
>>  1 file changed, 12 insertions(+)
>>
>> diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
>> index 3f4d28f..bf7c323 100644
>> --- a/drivers/net/wireless/ath/ath10k/core.c
>> +++ b/drivers/net/wireless/ath/ath10k/core.c
>> @@ -709,6 +709,18 @@ void ath10k_core_restart(struct ath10k *ar)
>>       spin_lock_bh(&ar->data_lock);
>>       ar->wmi.drop = true;
>>       wake_up(&ar->wmi.tx_credits_wq);
>> +
>> +     complete(&ar->target_suspend);
>> +     complete(&ar->debug.event_stats_compl);
>
> We dropped this patchset already, but for the future, this patch
> introduces a new warning:
>
>    drivers/net/wireless/ath/ath10k/core.c: In function 'ath10k_core_restart':
>>> drivers/net/wireless/ath/ath10k/core.c:714:14: error: 'struct ath10k'
>>> has no member named 'debug'
>      complete(&ar->debug.event_stats_compl);
>                  ^

Good catch. I completely forgot ar->debug is inside an #ifdef DEBUG.


> Maybe that complete call should be in debug.c?

Well, either we add an ifdef here (core.c @ L714), or an ifdef in
debug.h + debug.c..


Michał

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

end of thread, other threads:[~2014-05-19  6:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-09 12:35 [PATCH 0/7] ath10k: recovery improvements 2014-05-09 Michal Kazior
2014-05-09 12:35 ` [PATCH 1/7] ath10k: move restart_work call Michal Kazior
2014-05-09 12:35 ` [PATCH 2/7] ath10k: introduce core restart symbol Michal Kazior
2014-05-09 12:35 ` [PATCH 3/7] ath10k: drain wmi quickly upon hw restart Michal Kazior
2014-05-09 12:35 ` [PATCH 4/7] ath10k: wake up everything on core restart Michal Kazior
2014-05-15 13:21   ` Kalle Valo
2014-05-19  6:17     ` Michal Kazior
2014-05-09 12:35 ` [PATCH 5/7] ath10k: reduce timeout values Michal Kazior
2014-05-09 12:35 ` [PATCH 6/7] ath10k: make wmi timeout trigger hw restart Michal Kazior
2014-05-09 12:35 ` [PATCH 7/7] ath10k: remove old unused defines Michal Kazior
2014-05-12  7:34 ` [PATCH 0/7] ath10k: recovery improvements 2014-05-09 Michal Kazior
2014-05-14 13:34   ` Kalle Valo
2014-05-14 13:43     ` Michal Kazior
2014-05-14 13:54       ` Kalle Valo

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).