]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.20-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Feb 2019 17:12:59 +0000 (18:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Feb 2019 17:12:59 +0000 (18:12 +0100)
added patches:
ath9k-dynack-check-da-enabled-first-in-sampling-routines.patch
ath9k-dynack-make-ewma-estimation-faster.patch

queue-4.20/asoc-sunxi-sun50i-codec-analog-add-support-for-cpvdd.patch [deleted file]
queue-4.20/ath9k-dynack-check-da-enabled-first-in-sampling-routines.patch [new file with mode: 0644]
queue-4.20/ath9k-dynack-make-ewma-estimation-faster.patch [new file with mode: 0644]
queue-4.20/btrfs-reada-reorder-dev-replace-locks-before-radix-t.patch [deleted file]
queue-4.20/series

diff --git a/queue-4.20/asoc-sunxi-sun50i-codec-analog-add-support-for-cpvdd.patch b/queue-4.20/asoc-sunxi-sun50i-codec-analog-add-support-for-cpvdd.patch
deleted file mode 100644 (file)
index 82c9d3a..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-From 1e311200eee602c762a9d0bb8cd86896e08de784 Mon Sep 17 00:00:00 2001
-From: Chen-Yu Tsai <wens@csie.org>
-Date: Thu, 22 Nov 2018 18:23:19 +0800
-Subject: ASoC: sunxi: sun50i-codec-analog: Add support for cpvdd regulator
- supply
-
-[ Upstream commit ca0412a05756cd0b94751ca4d54fe6522f00b1f4 ]
-
-On the Allwinner A64 SoCs, the audio codec has a built-in headphone
-amplifier. This amplifier has a power supply separate from the rest of
-the analog audio circuitry, labeled cpvdd.
-
-This patch adds a DAPM widget for this supply, and ties it to the
-headphone amp widget.
-
-Signed-off-by: Chen-Yu Tsai <wens@csie.org>
-Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
-Signed-off-by: Mark Brown <broonie@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- sound/soc/sunxi/sun50i-codec-analog.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/sound/soc/sunxi/sun50i-codec-analog.c b/sound/soc/sunxi/sun50i-codec-analog.c
-index 8f5f999df631..df1fed0aa001 100644
---- a/sound/soc/sunxi/sun50i-codec-analog.c
-+++ b/sound/soc/sunxi/sun50i-codec-analog.c
-@@ -274,6 +274,7 @@ static const struct snd_soc_dapm_widget sun50i_a64_codec_widgets[] = {
-        * stream widgets at the card level.
-        */
-+      SND_SOC_DAPM_REGULATOR_SUPPLY("hpvcc", 0, 0),
-       SND_SOC_DAPM_MUX("Headphone Source Playback Route",
-                        SND_SOC_NOPM, 0, 0, sun50i_codec_hp_src),
-       SND_SOC_DAPM_OUT_DRV("Headphone Amp", SUN50I_ADDA_HP_CTRL,
-@@ -361,6 +362,7 @@ static const struct snd_soc_dapm_route sun50i_a64_codec_routes[] = {
-       { "Headphone Source Playback Route", "Mixer", "Left Mixer" },
-       { "Headphone Source Playback Route", "Mixer", "Right Mixer" },
-       { "Headphone Amp", NULL, "Headphone Source Playback Route" },
-+      { "Headphone Amp", NULL, "hpvcc" },
-       { "HP", NULL, "Headphone Amp" },
-       /* Microphone Routes */
--- 
-2.19.1
-
diff --git a/queue-4.20/ath9k-dynack-check-da-enabled-first-in-sampling-routines.patch b/queue-4.20/ath9k-dynack-check-da-enabled-first-in-sampling-routines.patch
new file mode 100644 (file)
index 0000000..1dda1a3
--- /dev/null
@@ -0,0 +1,42 @@
+From 9d3d65a91f027b8a9af5e63752d9b78cb10eb92d Mon Sep 17 00:00:00 2001
+From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
+Date: Fri, 2 Nov 2018 21:49:57 +0100
+Subject: ath9k: dynack: check da->enabled first in sampling routines
+
+From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
+
+commit 9d3d65a91f027b8a9af5e63752d9b78cb10eb92d upstream.
+
+Check da->enabled flag first in ath_dynack_sample_tx_ts and
+ath_dynack_sample_ack_ts routines in order to avoid useless
+processing
+
+Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
+Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/ath/ath9k/dynack.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/wireless/ath/ath9k/dynack.c
++++ b/drivers/net/wireless/ath/ath9k/dynack.c
+@@ -184,7 +184,7 @@ void ath_dynack_sample_tx_ts(struct ath_
+       struct ath_common *common = ath9k_hw_common(ah);
+       struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
+-      if ((info->flags & IEEE80211_TX_CTL_NO_ACK) || !da->enabled)
++      if (!da->enabled || (info->flags & IEEE80211_TX_CTL_NO_ACK))
+               return;
+       spin_lock_bh(&da->qlock);
+@@ -266,7 +266,7 @@ void ath_dynack_sample_ack_ts(struct ath
+       struct ath_common *common = ath9k_hw_common(ah);
+       struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
+-      if (!ath_dynack_bssidmask(ah, hdr->addr1) || !da->enabled)
++      if (!da->enabled || !ath_dynack_bssidmask(ah, hdr->addr1))
+               return;
+       spin_lock_bh(&da->qlock);
diff --git a/queue-4.20/ath9k-dynack-make-ewma-estimation-faster.patch b/queue-4.20/ath9k-dynack-make-ewma-estimation-faster.patch
new file mode 100644 (file)
index 0000000..4f65e15
--- /dev/null
@@ -0,0 +1,152 @@
+From 0c60c490830a1a756c80f8de8d33d9c6359d4a36 Mon Sep 17 00:00:00 2001
+From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
+Date: Fri, 2 Nov 2018 21:49:58 +0100
+Subject: ath9k: dynack: make ewma estimation faster
+
+From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
+
+commit 0c60c490830a1a756c80f8de8d33d9c6359d4a36 upstream.
+
+In order to make propagation time estimation faster,
+use current sample as ewma output value during 'late ack'
+tracking
+
+Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
+Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/ath/ath9k/ath9k.h  |    2 +-
+ drivers/net/wireless/ath/ath9k/dynack.c |   28 +++++++++++++++++++++-------
+ drivers/net/wireless/ath/ath9k/dynack.h |    6 ++++--
+ drivers/net/wireless/ath/ath9k/xmit.c   |    5 +++--
+ 4 files changed, 29 insertions(+), 12 deletions(-)
+
+--- a/drivers/net/wireless/ath/ath9k/ath9k.h
++++ b/drivers/net/wireless/ath/ath9k/ath9k.h
+@@ -272,7 +272,7 @@ struct ath_node {
+ #endif
+       u8 key_idx[4];
+-      u32 ackto;
++      int ackto;
+       struct list_head list;
+ };
+--- a/drivers/net/wireless/ath/ath9k/dynack.c
++++ b/drivers/net/wireless/ath/ath9k/dynack.c
+@@ -29,9 +29,13 @@
+  * ath_dynack_ewma - EWMA (Exponentially Weighted Moving Average) calculation
+  *
+  */
+-static inline u32 ath_dynack_ewma(u32 old, u32 new)
++static inline int ath_dynack_ewma(int old, int new)
+ {
+-      return (new * (EWMA_DIV - EWMA_LEVEL) + old * EWMA_LEVEL) / EWMA_DIV;
++      if (old > 0)
++              return (new * (EWMA_DIV - EWMA_LEVEL) +
++                      old * EWMA_LEVEL) / EWMA_DIV;
++      else
++              return new;
+ }
+ /**
+@@ -82,10 +86,10 @@ static inline bool ath_dynack_bssidmask(
+  */
+ static void ath_dynack_compute_ackto(struct ath_hw *ah)
+ {
+-      struct ath_node *an;
+-      u32 to = 0;
+-      struct ath_dynack *da = &ah->dynack;
+       struct ath_common *common = ath9k_hw_common(ah);
++      struct ath_dynack *da = &ah->dynack;
++      struct ath_node *an;
++      int to = 0;
+       list_for_each_entry(an, &da->nodes, list)
+               if (an->ackto > to)
+@@ -144,7 +148,8 @@ static void ath_dynack_compute_to(struct
+                                       an->ackto = ath_dynack_ewma(an->ackto,
+                                                                   ackto);
+                                       ath_dbg(ath9k_hw_common(ah), DYNACK,
+-                                              "%pM to %u\n", dst, an->ackto);
++                                              "%pM to %d [%u]\n", dst,
++                                              an->ackto, ackto);
+                                       if (time_is_before_jiffies(da->lto)) {
+                                               ath_dynack_compute_ackto(ah);
+                                               da->lto = jiffies + COMPUTE_TO;
+@@ -166,10 +171,12 @@ static void ath_dynack_compute_to(struct
+  * @ah: ath hw
+  * @skb: socket buffer
+  * @ts: tx status info
++ * @sta: station pointer
+  *
+  */
+ void ath_dynack_sample_tx_ts(struct ath_hw *ah, struct sk_buff *skb,
+-                           struct ath_tx_status *ts)
++                           struct ath_tx_status *ts,
++                           struct ieee80211_sta *sta)
+ {
+       u8 ridx;
+       struct ieee80211_hdr *hdr;
+@@ -190,9 +197,16 @@ void ath_dynack_sample_tx_ts(struct ath_
+                   ieee80211_is_assoc_resp(hdr->frame_control) ||
+                   ieee80211_is_auth(hdr->frame_control)) {
+                       ath_dbg(common, DYNACK, "late ack\n");
++
+                       ath9k_hw_setslottime(ah, (LATEACK_TO - 3) / 2);
+                       ath9k_hw_set_ack_timeout(ah, LATEACK_TO);
+                       ath9k_hw_set_cts_timeout(ah, LATEACK_TO);
++                      if (sta) {
++                              struct ath_node *an;
++
++                              an = (struct ath_node *)sta->drv_priv;
++                              an->ackto = -1;
++                      }
+                       da->lto = jiffies + LATEACK_DELAY;
+               }
+--- a/drivers/net/wireless/ath/ath9k/dynack.h
++++ b/drivers/net/wireless/ath/ath9k/dynack.h
+@@ -86,7 +86,8 @@ void ath_dynack_node_deinit(struct ath_h
+ void ath_dynack_init(struct ath_hw *ah);
+ void ath_dynack_sample_ack_ts(struct ath_hw *ah, struct sk_buff *skb, u32 ts);
+ void ath_dynack_sample_tx_ts(struct ath_hw *ah, struct sk_buff *skb,
+-                           struct ath_tx_status *ts);
++                           struct ath_tx_status *ts,
++                           struct ieee80211_sta *sta);
+ #else
+ static inline void ath_dynack_init(struct ath_hw *ah) {}
+ static inline void ath_dynack_node_init(struct ath_hw *ah,
+@@ -97,7 +98,8 @@ static inline void ath_dynack_sample_ack
+                                           struct sk_buff *skb, u32 ts) {}
+ static inline void ath_dynack_sample_tx_ts(struct ath_hw *ah,
+                                          struct sk_buff *skb,
+-                                         struct ath_tx_status *ts) {}
++                                         struct ath_tx_status *ts,
++                                         struct ieee80211_sta *sta) {}
+ #endif
+ #endif /* DYNACK_H */
+--- a/drivers/net/wireless/ath/ath9k/xmit.c
++++ b/drivers/net/wireless/ath/ath9k/xmit.c
+@@ -629,7 +629,7 @@ static void ath_tx_complete_aggr(struct
+                               if (bf == bf->bf_lastbf)
+                                       ath_dynack_sample_tx_ts(sc->sc_ah,
+                                                               bf->bf_mpdu,
+-                                                              ts);
++                                                              ts, sta);
+                       }
+                       ath_tx_complete_buf(sc, bf, txq, &bf_head, sta, ts,
+@@ -773,7 +773,8 @@ static void ath_tx_process_buffer(struct
+                       memcpy(info->control.rates, bf->rates,
+                              sizeof(info->control.rates));
+                       ath_tx_rc_status(sc, bf, ts, 1, txok ? 0 : 1, txok);
+-                      ath_dynack_sample_tx_ts(sc->sc_ah, bf->bf_mpdu, ts);
++                      ath_dynack_sample_tx_ts(sc->sc_ah, bf->bf_mpdu, ts,
++                                              sta);
+               }
+               ath_tx_complete_buf(sc, bf, txq, bf_head, sta, ts, txok);
+       } else
diff --git a/queue-4.20/btrfs-reada-reorder-dev-replace-locks-before-radix-t.patch b/queue-4.20/btrfs-reada-reorder-dev-replace-locks-before-radix-t.patch
deleted file mode 100644 (file)
index 5a1843c..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-From 64a146e23196c0eea70cf82752cea35992c2e8fa Mon Sep 17 00:00:00 2001
-From: David Sterba <dsterba@suse.com>
-Date: Fri, 24 Aug 2018 19:35:04 +0200
-Subject: btrfs: reada: reorder dev-replace locks before radix tree preload
-
-[ Upstream commit ceb21a8db48559fd0809e03c4df9eb37743d9170 ]
-
-The device-replace read lock is going to use rw semaphore in followup
-commits. The semaphore might sleep which is not possible in the radix
-tree preload section. The lock nesting is now:
-
-* device replace
-  * radix tree preload
-    * readahead spinlock
-
-Signed-off-by: David Sterba <dsterba@suse.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- fs/btrfs/reada.c | 12 +++++++-----
- 1 file changed, 7 insertions(+), 5 deletions(-)
-
-diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c
-index dec14b739b10..6f81f3e88b6d 100644
---- a/fs/btrfs/reada.c
-+++ b/fs/btrfs/reada.c
-@@ -376,26 +376,28 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info,
-               goto error;
-       }
-+      /* Insert extent in reada tree + all per-device trees, all or nothing */
-+      btrfs_dev_replace_read_lock(&fs_info->dev_replace);
-       ret = radix_tree_preload(GFP_KERNEL);
--      if (ret)
-+      if (ret) {
-+              btrfs_dev_replace_read_unlock(&fs_info->dev_replace);
-               goto error;
-+      }
--      /* insert extent in reada_tree + all per-device trees, all or nothing */
--      btrfs_dev_replace_read_lock(&fs_info->dev_replace);
-       spin_lock(&fs_info->reada_lock);
-       ret = radix_tree_insert(&fs_info->reada_tree, index, re);
-       if (ret == -EEXIST) {
-               re_exist = radix_tree_lookup(&fs_info->reada_tree, index);
-               re_exist->refcnt++;
-               spin_unlock(&fs_info->reada_lock);
--              btrfs_dev_replace_read_unlock(&fs_info->dev_replace);
-               radix_tree_preload_end();
-+              btrfs_dev_replace_read_unlock(&fs_info->dev_replace);
-               goto error;
-       }
-       if (ret) {
-               spin_unlock(&fs_info->reada_lock);
--              btrfs_dev_replace_read_unlock(&fs_info->dev_replace);
-               radix_tree_preload_end();
-+              btrfs_dev_replace_read_unlock(&fs_info->dev_replace);
-               goto error;
-       }
-       radix_tree_preload_end();
--- 
-2.19.1
-
index 1caee5025952a8ffadce26f8f85115687ac13856..54f98b87ab970a7e4c1e173124a5fd67d5807984 100644 (file)
@@ -63,7 +63,6 @@ x86-resctrl-fixup-the-user-visible-strings.patch
 media-vivid-fill-in-media_device-bus_info.patch
 rdma-core-sync-unregistration-with-netlink-commands.patch
 drm-rcar-du-fix-external-clock-error-checks.patch
-asoc-sunxi-sun50i-codec-analog-add-support-for-cpvdd.patch
 clk-meson-meson8b-do-not-use-cpu_div3-for-cpu_scale_.patch
 clk-meson-meson8b-fix-the-width-of-the-cpu_scale_div.patch
 clk-meson-meson8b-mark-the-cpu-clock-as-clk_is_criti.patch
@@ -177,7 +176,6 @@ mmc-sdhci-xenon-fix-timeout-checks.patch
 mmc-jz4740-get-cd-wp-gpios-from-descriptors.patch
 usb-renesas_usbhs-add-support-for-rz-g2e.patch
 btrfs-harden-agaist-duplicate-fsid-on-scanned-device.patch
-btrfs-reada-reorder-dev-replace-locks-before-radix-t.patch
 serial-sh-sci-fix-locking-in-sci_submit_rx.patch
 serial-sh-sci-resume-pio-in-sci_rx_interrupt-on-dma-.patch
 tty-serial-samsung-properly-set-flags-in-autocts-mod.patch
@@ -348,3 +346,5 @@ serial-8250_pci-make-pci-class-test-non-fatal.patch
 serial-sh-sci-do-not-free-irqs-that-have-already-been-freed.patch
 cacheinfo-keep-the-old-value-if-of_property_read_u32-fails.patch
 nfsd-fix-error-return-values-for-nfsd4_clone_file_range.patch
+ath9k-dynack-make-ewma-estimation-faster.patch
+ath9k-dynack-check-da-enabled-first-in-sampling-routines.patch