From: Felix Fietkau Date: Fri, 17 Jun 2016 12:12:44 +0000 (+0200) Subject: ath10k: merge some more pending upstream fixes X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4bab4dee84266fd1550cfdee25ee0ed7d7a62e78;p=openwrt%2Fstaging%2Faparcar.git ath10k: merge some more pending upstream fixes Signed-off-by: Felix Fietkau --- diff --git a/package/kernel/mac80211/patches/310-ath10k-improve-tx-scheduling.patch b/package/kernel/mac80211/patches/310-ath10k-improve-tx-scheduling.patch new file mode 100644 index 0000000000..81ac2db842 --- /dev/null +++ b/package/kernel/mac80211/patches/310-ath10k-improve-tx-scheduling.patch @@ -0,0 +1,67 @@ +From: Michal Kazior +Date: Mon, 23 May 2016 23:12:45 +0300 +Subject: [PATCH] ath10k: improve tx scheduling + +Recent changes revolving around implementing +wake_tx_queue support introduced a significant +performance regressions on some (slower, uni-proc) +systems. + +Signed-off-by: Michal Kazior +Signed-off-by: Kalle Valo +--- + +--- a/drivers/net/wireless/ath/ath10k/htt_rx.c ++++ b/drivers/net/wireless/ath/ath10k/htt_rx.c +@@ -2291,7 +2291,6 @@ bool ath10k_htt_t2h_msg_handler(struct a + ath10k_htt_tx_mgmt_dec_pending(htt); + spin_unlock_bh(&htt->tx_lock); + } +- ath10k_mac_tx_push_pending(ar); + break; + } + case HTT_T2H_MSG_TYPE_TX_COMPL_IND: +@@ -2442,8 +2441,6 @@ static void ath10k_htt_txrx_compl_task(u + dev_kfree_skb_any(skb); + } + +- ath10k_mac_tx_push_pending(ar); +- + num_mpdus = atomic_read(&htt->num_mpdus_ready); + + while (num_mpdus) { +--- a/drivers/net/wireless/ath/ath10k/mac.c ++++ b/drivers/net/wireless/ath/ath10k/mac.c +@@ -3827,6 +3827,9 @@ void ath10k_mac_tx_push_pending(struct a + int ret; + int max; + ++ if (ar->htt.num_pending_tx >= (ar->htt.max_num_pending_tx / 2)) ++ return; ++ + spin_lock_bh(&ar->txqs_lock); + rcu_read_lock(); + +@@ -4097,9 +4100,7 @@ static void ath10k_mac_op_wake_tx_queue( + 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_mac_tx_push_pending(ar); + ath10k_htt_tx_txq_update(hw, txq); + } + +--- a/drivers/net/wireless/ath/ath10k/txrx.c ++++ b/drivers/net/wireless/ath/ath10k/txrx.c +@@ -117,6 +117,9 @@ int ath10k_txrx_tx_unref(struct ath10k_h + + ieee80211_tx_status(htt->ar->hw, msdu); + /* we do not own the msdu anymore */ ++ ++ ath10k_mac_tx_push_pending(ar); ++ + return 0; + } + diff --git a/package/kernel/mac80211/patches/311-ath10k-fix-deadlock-while-processing-rx_in_ord_ind.patch b/package/kernel/mac80211/patches/311-ath10k-fix-deadlock-while-processing-rx_in_ord_ind.patch new file mode 100644 index 0000000000..3664d70984 --- /dev/null +++ b/package/kernel/mac80211/patches/311-ath10k-fix-deadlock-while-processing-rx_in_ord_ind.patch @@ -0,0 +1,59 @@ +From: Rajkumar Manoharan +Date: Thu, 9 Jun 2016 11:33:55 +0530 +Subject: [PATCH] ath10k: fix deadlock while processing rx_in_ord_ind + +commit 5c86d97bcc1d ("ath10k: combine txrx and replenish task") +introduced deadlock while processing rx in order indication message +for qca6174 based devices. While merging replenish and txrx tasklets, +replenish task should be called out of htt rx ring locking since it +is also try to acquire the same lock. + +Unfortunately this issue is not exposed by other solutions (qca988x, +qca99x0 & qca4019), as rx_in_ord_ind message is specific to qca6174 +based devices. This patch fixes + +============================================= +[ INFO: possible recursive locking detected ] +4.7.0-rc2-wt-ath+ #1353 Tainted: G E +--------------------------------------------- +swapper/3/0 is trying to acquire lock: + (&(&htt->rx_ring.lock)->rlock){+.-...}, at: [] +ath10k_htt_rx_msdu_buff_replenish+0x29/0x90 [ath10k_core] + +but task is already holding lock: + (&(&htt->rx_ring.lock)->rlock){+.-...}, at: [] +ath10k_htt_txrx_compl_task+0x21b/0x250 [ath10k_core] + +other info that might help us debug this: + Possible unsafe locking scenario: + + CPU0 + ---- + lock(&(&htt->rx_ring.lock)->rlock); + lock(&(&htt->rx_ring.lock)->rlock); + + *** DEADLOCK *** + + May be due to missing lock nesting notation + +1 lock held by swapper/3/0: + #0: (&(&htt->rx_ring.lock)->rlock){+.-...}, at: [] +ath10k_htt_txrx_compl_task+0x21b/0x250 [ath10k_core] + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=119151 +Fixes: 5c86d97bcc1d ("ath10k: combine txrx and replenish task") +Reported-by: Mike Lothian +Signed-off-by: Rajkumar Manoharan +Signed-off-by: Kalle Valo +--- + +--- a/drivers/net/wireless/ath/ath10k/htt_rx.c ++++ b/drivers/net/wireless/ath/ath10k/htt_rx.c +@@ -1904,7 +1904,6 @@ static void ath10k_htt_rx_in_ord_ind(str + return; + } + } +- ath10k_htt_rx_msdu_buff_replenish(htt); + } + + static void ath10k_htt_rx_tx_fetch_resp_id_confirm(struct ath10k *ar, diff --git a/package/kernel/mac80211/patches/930-ath10k_add_tpt_led_trigger.patch b/package/kernel/mac80211/patches/930-ath10k_add_tpt_led_trigger.patch index 92ed7a0d9a..1bfded01b0 100644 --- a/package/kernel/mac80211/patches/930-ath10k_add_tpt_led_trigger.patch +++ b/package/kernel/mac80211/patches/930-ath10k_add_tpt_led_trigger.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -7716,6 +7716,21 @@ struct ath10k_vif *ath10k_get_arvif(stru +@@ -7717,6 +7717,21 @@ struct ath10k_vif *ath10k_get_arvif(stru return arvif_iter.arvif; } @@ -22,7 +22,7 @@ int ath10k_mac_register(struct ath10k *ar) { static const u32 cipher_suites[] = { -@@ -7940,6 +7955,12 @@ int ath10k_mac_register(struct ath10k *a +@@ -7941,6 +7956,12 @@ int ath10k_mac_register(struct ath10k *a ar->hw->wiphy->cipher_suites = cipher_suites; ar->hw->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);