* [PATCH 0/2] ath10k: fix tx hangs
@ 2016-03-17 9:51 Michal Kazior
2016-03-17 9:51 ` [PATCH 1/2] ath10k: fix tx hang Michal Kazior
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Michal Kazior @ 2016-03-17 9:51 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Michal Kazior
Hi,
My recent wake-tx-queue/pull-push related patches
introduced a regression that can cause tx to hang
under certain circumstances.
Michal Kazior (2):
ath10k: fix tx hang
ath10k: fix pull-push tx threshold handling
drivers/net/wireless/ath/ath10k/mac.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
--
2.1.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] ath10k: fix tx hang
2016-03-17 9:51 [PATCH 0/2] ath10k: fix tx hangs Michal Kazior
@ 2016-03-17 9:51 ` Michal Kazior
2016-03-17 9:51 ` [PATCH 2/2] ath10k: fix pull-push tx threshold handling Michal Kazior
2016-03-23 12:09 ` [PATCH 0/2] ath10k: fix tx hangs Valo, Kalle
2 siblings, 0 replies; 4+ messages in thread
From: Michal Kazior @ 2016-03-17 9:51 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Michal Kazior
The wake_tx_queue/push_pending logic had a bug
which could stop queues indefinitely effectivelly
breaking traffic.
Fixes: 299468782d94 ("ath10k: implement wake_tx_queue")
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
drivers/net/wireless/ath/ath10k/mac.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index ebff9c0a0784..74dd010a9188 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3779,13 +3779,13 @@ void ath10k_mac_tx_push_pending(struct ath10k *ar)
}
list_del_init(&artxq->list);
+ if (ret != -ENOENT)
+ list_add_tail(&artxq->list, &ar->txqs);
+
ath10k_htt_tx_txq_update(hw, txq);
- if (artxq == last || (ret < 0 && ret != -ENOENT)) {
- if (ret != -ENOENT)
- list_add_tail(&artxq->list, &ar->txqs);
+ if (artxq == last || (ret < 0 && ret != -ENOENT))
break;
- }
}
rcu_read_unlock();
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] ath10k: fix pull-push tx threshold handling
2016-03-17 9:51 [PATCH 0/2] ath10k: fix tx hangs Michal Kazior
2016-03-17 9:51 ` [PATCH 1/2] ath10k: fix tx hang Michal Kazior
@ 2016-03-17 9:51 ` Michal Kazior
2016-03-23 12:09 ` [PATCH 0/2] ath10k: fix tx hangs Valo, Kalle
2 siblings, 0 replies; 4+ messages in thread
From: Michal Kazior @ 2016-03-17 9:51 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Michal Kazior
This prevents tx hangs or hiccups if pull-push
supporting firmware defines per-txq thresholds or
switches modes dynamically.
Fixes: 299468782d94 ("ath10k: implement wake_tx_queue")
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
drivers/net/wireless/ath/ath10k/mac.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 74dd010a9188..4d51b92e67e0 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3772,7 +3772,8 @@ void ath10k_mac_tx_push_pending(struct ath10k *ar)
/* Prevent aggressive sta/tid taking over tx queue */
max = 16;
- while (max--) {
+ ret = 0;
+ while (ath10k_mac_tx_can_push(hw, txq) && max--) {
ret = ath10k_mac_tx_push_txq(hw, txq);
if (ret < 0)
break;
@@ -4015,14 +4016,13 @@ static void ath10k_mac_op_wake_tx_queue(struct ieee80211_hw *hw,
struct ath10k *ar = hw->priv;
struct ath10k_txq *artxq = (void *)txq->drv_priv;
- if (ath10k_mac_tx_can_push(hw, txq)) {
- spin_lock_bh(&ar->txqs_lock);
- if (list_empty(&artxq->list))
- list_add_tail(&artxq->list, &ar->txqs);
- spin_unlock_bh(&ar->txqs_lock);
+ spin_lock_bh(&ar->txqs_lock);
+ if (list_empty(&artxq->list))
+ list_add_tail(&artxq->list, &ar->txqs);
+ spin_unlock_bh(&ar->txqs_lock);
+ if (ath10k_mac_tx_can_push(hw, txq))
tasklet_schedule(&ar->htt.txrx_compl_task);
- }
ath10k_htt_tx_txq_update(hw, txq);
}
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] ath10k: fix tx hangs
2016-03-17 9:51 [PATCH 0/2] ath10k: fix tx hangs Michal Kazior
2016-03-17 9:51 ` [PATCH 1/2] ath10k: fix tx hang Michal Kazior
2016-03-17 9:51 ` [PATCH 2/2] ath10k: fix pull-push tx threshold handling Michal Kazior
@ 2016-03-23 12:09 ` Valo, Kalle
2 siblings, 0 replies; 4+ messages in thread
From: Valo, Kalle @ 2016-03-23 12:09 UTC (permalink / raw)
To: michal.kazior@tieto.com
Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
Michal Kazior <michal.kazior@tieto.com> writes:
> My recent wake-tx-queue/pull-push related patches
> introduced a regression that can cause tx to hang
> under certain circumstances.
>
>
> Michal Kazior (2):
> ath10k: fix tx hang
> ath10k: fix pull-push tx threshold handling
Both applied, thanks.
--
Kalle Valo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-23 12:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-17 9:51 [PATCH 0/2] ath10k: fix tx hangs Michal Kazior
2016-03-17 9:51 ` [PATCH 1/2] ath10k: fix tx hang Michal Kazior
2016-03-17 9:51 ` [PATCH 2/2] ath10k: fix pull-push tx threshold handling Michal Kazior
2016-03-23 12:09 ` [PATCH 0/2] ath10k: fix tx hangs Valo, Kalle
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).