]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 May 2021 13:06:56 +0000 (15:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 May 2021 13:06:56 +0000 (15:06 +0200)
added patches:
asoc-rsnd-check-all-busif-status-when-error.patch
clk-exynos7-mark-aclk_fsys1_200-as-critical.patch
debugfs-make-debugfs_allow-ro-after-init.patch
dt-bindings-media-renesas-vin-make-resets-optional-on-r-car-gen1.patch
dt-bindings-serial-8250-remove-duplicated-compatible-strings.patch
ext4-fix-debug-format-string-warning.patch
i2c-mediatek-fix-send-master-code-at-more-than-1mhz.patch
media-rkvdec-remove-of_match_ptr.patch
nvme-do-not-try-to-reconfigure-apst-when-the-controller-is-not-live.patch

queue-5.10/asoc-rsnd-check-all-busif-status-when-error.patch [new file with mode: 0644]
queue-5.10/clk-exynos7-mark-aclk_fsys1_200-as-critical.patch [new file with mode: 0644]
queue-5.10/debugfs-make-debugfs_allow-ro-after-init.patch [new file with mode: 0644]
queue-5.10/dt-bindings-media-renesas-vin-make-resets-optional-on-r-car-gen1.patch [new file with mode: 0644]
queue-5.10/dt-bindings-serial-8250-remove-duplicated-compatible-strings.patch [new file with mode: 0644]
queue-5.10/ext4-fix-debug-format-string-warning.patch [new file with mode: 0644]
queue-5.10/i2c-mediatek-fix-send-master-code-at-more-than-1mhz.patch [new file with mode: 0644]
queue-5.10/media-rkvdec-remove-of_match_ptr.patch [new file with mode: 0644]
queue-5.10/nvme-do-not-try-to-reconfigure-apst-when-the-controller-is-not-live.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/asoc-rsnd-check-all-busif-status-when-error.patch b/queue-5.10/asoc-rsnd-check-all-busif-status-when-error.patch
new file mode 100644 (file)
index 0000000..af13d48
--- /dev/null
@@ -0,0 +1,41 @@
+From a4856e15e58b54977f1c0c0299309ad4d1f13365 Mon Sep 17 00:00:00 2001
+From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Date: Thu, 8 Apr 2021 13:28:47 +0900
+Subject: ASoC: rsnd: check all BUSIF status when error
+
+From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+
+commit a4856e15e58b54977f1c0c0299309ad4d1f13365 upstream.
+
+commit 66c705d07d784 ("SoC: rsnd: add interrupt support for SSI BUSIF
+buffer") adds __rsnd_ssi_interrupt() checks for BUSIF status,
+but is using "break" at for loop.
+This means it is not checking all status. Let's check all BUSIF status.
+
+Fixes: commit 66c705d07d784 ("SoC: rsnd: add interrupt support for SSI BUSIF buffer")
+Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Link: https://lore.kernel.org/r/874kgh1jsw.wl-kuninori.morimoto.gx@renesas.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/sh/rcar/ssi.c |    2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/sound/soc/sh/rcar/ssi.c
++++ b/sound/soc/sh/rcar/ssi.c
+@@ -797,7 +797,6 @@ static void __rsnd_ssi_interrupt(struct
+                                                      SSI_SYS_STATUS(i * 2),
+                                                      0xf << (id * 4));
+                                       stop = true;
+-                                      break;
+                               }
+                       }
+                       break;
+@@ -815,7 +814,6 @@ static void __rsnd_ssi_interrupt(struct
+                                               SSI_SYS_STATUS((i * 2) + 1),
+                                               0xf << 4);
+                                       stop = true;
+-                                      break;
+                               }
+                       }
+                       break;
diff --git a/queue-5.10/clk-exynos7-mark-aclk_fsys1_200-as-critical.patch b/queue-5.10/clk-exynos7-mark-aclk_fsys1_200-as-critical.patch
new file mode 100644 (file)
index 0000000..76720a5
--- /dev/null
@@ -0,0 +1,50 @@
+From 34138a59b92c1a30649a18ec442d2e61f3bc34dd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pawe=C5=82=20Chmiel?= <pawel.mikolaj.chmiel@gmail.com>
+Date: Sat, 24 Oct 2020 17:43:46 +0200
+Subject: clk: exynos7: Mark aclk_fsys1_200 as critical
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
+
+commit 34138a59b92c1a30649a18ec442d2e61f3bc34dd upstream.
+
+This clock must be always enabled to allow access to any registers in
+fsys1 CMU. Until proper solution based on runtime PM is applied
+(similar to what was done for Exynos5433), mark that clock as critical
+so it won't be disabled.
+
+It was observed on Samsung Galaxy S6 device (based on Exynos7420), where
+UFS module is probed before pmic used to power that device.
+In this case defer probe was happening and that clock was disabled by
+UFS driver, causing whole boot to hang on next CMU access.
+
+Fixes: 753195a749a6 ("clk: samsung: exynos7: Correct CMU_FSYS1 clocks names")
+Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
+Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
+Link: https://lore.kernel.org/linux-clk/20201024154346.9589-1-pawel.mikolaj.chmiel@gmail.com
+[s.nawrocki: Added comment in the code]
+Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/clk/samsung/clk-exynos7.c |    7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/drivers/clk/samsung/clk-exynos7.c
++++ b/drivers/clk/samsung/clk-exynos7.c
+@@ -537,8 +537,13 @@ static const struct samsung_gate_clock t
+       GATE(CLK_ACLK_FSYS0_200, "aclk_fsys0_200", "dout_aclk_fsys0_200",
+               ENABLE_ACLK_TOP13, 28, CLK_SET_RATE_PARENT |
+               CLK_IS_CRITICAL, 0),
++      /*
++       * This clock is required for the CMU_FSYS1 registers access, keep it
++       * enabled permanently until proper runtime PM support is added.
++       */
+       GATE(CLK_ACLK_FSYS1_200, "aclk_fsys1_200", "dout_aclk_fsys1_200",
+-              ENABLE_ACLK_TOP13, 24, CLK_SET_RATE_PARENT, 0),
++              ENABLE_ACLK_TOP13, 24, CLK_SET_RATE_PARENT |
++              CLK_IS_CRITICAL, 0),
+       GATE(CLK_SCLK_PHY_FSYS1_26M, "sclk_phy_fsys1_26m",
+               "dout_sclk_phy_fsys1_26m", ENABLE_SCLK_TOP1_FSYS11,
diff --git a/queue-5.10/debugfs-make-debugfs_allow-ro-after-init.patch b/queue-5.10/debugfs-make-debugfs_allow-ro-after-init.patch
new file mode 100644 (file)
index 0000000..3d71f4c
--- /dev/null
@@ -0,0 +1,33 @@
+From 312723a0b34d6d110aa4427a982536bb36ab8471 Mon Sep 17 00:00:00 2001
+From: Kees Cook <keescook@chromium.org>
+Date: Mon, 5 Apr 2021 14:39:59 -0700
+Subject: debugfs: Make debugfs_allow RO after init
+
+From: Kees Cook <keescook@chromium.org>
+
+commit 312723a0b34d6d110aa4427a982536bb36ab8471 upstream.
+
+Since debugfs_allow is only set at boot time during __init, make it
+read-only after being set.
+
+Fixes: a24c6f7bc923 ("debugfs: Add access restriction option")
+Cc: Peter Enderborg <peter.enderborg@sony.com>
+Reviewed-by: Peter Enderborg <peter.enderborg@sony.com>
+Signed-off-by: Kees Cook <keescook@chromium.org>
+Link: https://lore.kernel.org/r/20210405213959.3079432-1-keescook@chromium.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/debugfs/inode.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/debugfs/inode.c
++++ b/fs/debugfs/inode.c
+@@ -35,7 +35,7 @@
+ static struct vfsmount *debugfs_mount;
+ static int debugfs_mount_count;
+ static bool debugfs_registered;
+-static unsigned int debugfs_allow = DEFAULT_DEBUGFS_ALLOW_BITS;
++static unsigned int debugfs_allow __ro_after_init = DEFAULT_DEBUGFS_ALLOW_BITS;
+ /*
+  * Don't allow access attributes to be changed whilst the kernel is locked down
diff --git a/queue-5.10/dt-bindings-media-renesas-vin-make-resets-optional-on-r-car-gen1.patch b/queue-5.10/dt-bindings-media-renesas-vin-make-resets-optional-on-r-car-gen1.patch
new file mode 100644 (file)
index 0000000..618fa6b
--- /dev/null
@@ -0,0 +1,80 @@
+From 7935bb56e21b2add81149f4def8e59b4133fe57c Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert+renesas@glider.be>
+Date: Thu, 29 Apr 2021 14:45:52 +0200
+Subject: dt-bindings: media: renesas,vin: Make resets optional on R-Car Gen1
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Geert Uytterhoeven <geert+renesas@glider.be>
+
+commit 7935bb56e21b2add81149f4def8e59b4133fe57c upstream.
+
+The "resets" property is not present on R-Car Gen1 SoCs.
+Supporting it would require migrating from renesas,cpg-clocks to
+renesas,cpg-mssr.
+
+Fixes: 905fc6b1bfb4a631 ("dt-bindings: rcar-vin: Convert bindings to json-schema")
+Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
+Link: https://lore.kernel.org/r/217c8197efaee7d803b22d433abb0ea8e33b84c6.1619700314.git.geert+renesas@glider.be
+Signed-off-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/devicetree/bindings/media/renesas,vin.yaml |   44 +++++++++------
+ 1 file changed, 28 insertions(+), 16 deletions(-)
+
+--- a/Documentation/devicetree/bindings/media/renesas,vin.yaml
++++ b/Documentation/devicetree/bindings/media/renesas,vin.yaml
+@@ -278,23 +278,35 @@ required:
+   - interrupts
+   - clocks
+   - power-domains
+-  - resets
+-if:
+-  properties:
+-    compatible:
+-      contains:
+-        enum:
+-          - renesas,vin-r8a7778
+-          - renesas,vin-r8a7779
+-          - renesas,rcar-gen2-vin
+-then:
+-  required:
+-    - port
+-else:
+-  required:
+-    - renesas,id
+-    - ports
++allOf:
++  - if:
++      not:
++        properties:
++          compatible:
++            contains:
++              enum:
++                - renesas,vin-r8a7778
++                - renesas,vin-r8a7779
++    then:
++      required:
++        - resets
++
++  - if:
++      properties:
++        compatible:
++          contains:
++            enum:
++              - renesas,vin-r8a7778
++              - renesas,vin-r8a7779
++              - renesas,rcar-gen2-vin
++    then:
++      required:
++        - port
++    else:
++      required:
++        - renesas,id
++        - ports
+ additionalProperties: false
diff --git a/queue-5.10/dt-bindings-serial-8250-remove-duplicated-compatible-strings.patch b/queue-5.10/dt-bindings-serial-8250-remove-duplicated-compatible-strings.patch
new file mode 100644 (file)
index 0000000..940ae2a
--- /dev/null
@@ -0,0 +1,34 @@
+From a7277a73984114b38dcb62c8548850800ffe864e Mon Sep 17 00:00:00 2001
+From: Zhen Lei <thunder.leizhen@huawei.com>
+Date: Thu, 22 Apr 2021 17:08:57 +0800
+Subject: dt-bindings: serial: 8250: Remove duplicated compatible strings
+
+From: Zhen Lei <thunder.leizhen@huawei.com>
+
+commit a7277a73984114b38dcb62c8548850800ffe864e upstream.
+
+The compatible strings "mediatek,*" appears two times, remove one of them.
+
+Fixes: e69f5dc623f9 ("dt-bindings: serial: Convert 8250 to json-schema")
+Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
+Link: https://lore.kernel.org/r/20210422090857.583-1-thunder.leizhen@huawei.com
+Signed-off-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/devicetree/bindings/serial/8250.yaml |    5 -----
+ 1 file changed, 5 deletions(-)
+
+--- a/Documentation/devicetree/bindings/serial/8250.yaml
++++ b/Documentation/devicetree/bindings/serial/8250.yaml
+@@ -94,11 +94,6 @@ properties:
+               - mediatek,mt7623-btif
+           - const: mediatek,mtk-btif
+       - items:
+-          - enum:
+-              - mediatek,mt7622-btif
+-              - mediatek,mt7623-btif
+-          - const: mediatek,mtk-btif
+-      - items:
+           - const: mrvl,mmp-uart
+           - const: intel,xscale-uart
+       - items:
diff --git a/queue-5.10/ext4-fix-debug-format-string-warning.patch b/queue-5.10/ext4-fix-debug-format-string-warning.patch
new file mode 100644 (file)
index 0000000..dd9bef6
--- /dev/null
@@ -0,0 +1,67 @@
+From fcdf3c34b7abdcbb49690c94c7fa6ce224dc9749 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Fri, 9 Apr 2021 22:12:05 +0200
+Subject: ext4: fix debug format string warning
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit fcdf3c34b7abdcbb49690c94c7fa6ce224dc9749 upstream.
+
+Using no_printk() for jbd_debug() revealed two warnings:
+
+fs/jbd2/recovery.c: In function 'fc_do_one_pass':
+fs/jbd2/recovery.c:256:30: error: format '%d' expects a matching 'int' argument [-Werror=format=]
+  256 |                 jbd_debug(3, "Processing fast commit blk with seq %d");
+      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+fs/ext4/fast_commit.c: In function 'ext4_fc_replay_add_range':
+fs/ext4/fast_commit.c:1732:30: error: format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Werror=format=]
+ 1732 |                 jbd_debug(1, "Converting from %d to %d %lld",
+
+The first one was added incorrectly, and was also missing a few newlines
+in debug output, and the second one happened when the type of an
+argument changed.
+
+Reported-by: kernel test robot <lkp@intel.com>
+Fixes: d556435156b7 ("jbd2: avoid -Wempty-body warnings")
+Fixes: 6db074618969 ("ext4: use BIT() macro for BH_** state bits")
+Fixes: 5b849b5f96b4 ("jbd2: fast commit recovery path")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Link: https://lore.kernel.org/r/20210409201211.1866633-1-arnd@kernel.org
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/ext4/fast_commit.c |    2 +-
+ fs/jbd2/recovery.c    |    5 ++---
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+--- a/fs/ext4/fast_commit.c
++++ b/fs/ext4/fast_commit.c
+@@ -1694,7 +1694,7 @@ static int ext4_fc_replay_add_range(stru
+               }
+               /* Range is mapped and needs a state change */
+-              jbd_debug(1, "Converting from %d to %d %lld",
++              jbd_debug(1, "Converting from %ld to %d %lld",
+                               map.m_flags & EXT4_MAP_UNWRITTEN,
+                       ext4_ext_is_unwritten(ex), map.m_pblk);
+               ret = ext4_ext_replay_update_ex(inode, cur, map.m_len,
+--- a/fs/jbd2/recovery.c
++++ b/fs/jbd2/recovery.c
+@@ -245,15 +245,14 @@ static int fc_do_one_pass(journal_t *jou
+               return 0;
+       while (next_fc_block <= journal->j_fc_last) {
+-              jbd_debug(3, "Fast commit replay: next block %ld",
++              jbd_debug(3, "Fast commit replay: next block %ld\n",
+                         next_fc_block);
+               err = jread(&bh, journal, next_fc_block);
+               if (err) {
+-                      jbd_debug(3, "Fast commit replay: read error");
++                      jbd_debug(3, "Fast commit replay: read error\n");
+                       break;
+               }
+-              jbd_debug(3, "Processing fast commit blk with seq %d");
+               err = journal->j_fc_replay_callback(journal, bh, pass,
+                                       next_fc_block - journal->j_fc_first,
+                                       expected_commit_id);
diff --git a/queue-5.10/i2c-mediatek-fix-send-master-code-at-more-than-1mhz.patch b/queue-5.10/i2c-mediatek-fix-send-master-code-at-more-than-1mhz.patch
new file mode 100644 (file)
index 0000000..777c522
--- /dev/null
@@ -0,0 +1,60 @@
+From 63ce8e3df8f6deca2da52eaf064751ad4018b46e Mon Sep 17 00:00:00 2001
+From: Qii Wang <qii.wang@mediatek.com>
+Date: Sat, 17 Apr 2021 14:46:50 +0800
+Subject: i2c: mediatek: Fix send master code at more than 1MHz
+
+From: Qii Wang <qii.wang@mediatek.com>
+
+commit 63ce8e3df8f6deca2da52eaf064751ad4018b46e upstream.
+
+There are some omissions in the previous patch about replacing
+I2C_MAX_FAST_MODE__FREQ with I2C_MAX_FAST_MODE_PLUS_FREQ and
+need to fix it.
+
+Fixes: b44658e755b5("i2c: mediatek: Send i2c master code at more than 1MHz")
+Signed-off-by: Qii Wang <qii.wang@mediatek.com>
+Signed-off-by: Wolfram Sang <wsa@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/i2c/busses/i2c-mt65xx.c |    9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+--- a/drivers/i2c/busses/i2c-mt65xx.c
++++ b/drivers/i2c/busses/i2c-mt65xx.c
+@@ -564,7 +564,7 @@ static const struct i2c_spec_values *mtk
+ static int mtk_i2c_max_step_cnt(unsigned int target_speed)
+ {
+-      if (target_speed > I2C_MAX_FAST_MODE_FREQ)
++      if (target_speed > I2C_MAX_FAST_MODE_PLUS_FREQ)
+               return MAX_HS_STEP_CNT_DIV;
+       else
+               return MAX_STEP_CNT_DIV;
+@@ -635,7 +635,7 @@ static int mtk_i2c_check_ac_timing(struc
+       if (sda_min > sda_max)
+               return -3;
+-      if (check_speed > I2C_MAX_FAST_MODE_FREQ) {
++      if (check_speed > I2C_MAX_FAST_MODE_PLUS_FREQ) {
+               if (i2c->dev_comp->ltiming_adjust) {
+                       i2c->ac_timing.hs = I2C_TIME_DEFAULT_VALUE |
+                               (sample_cnt << 12) | (high_cnt << 8);
+@@ -850,7 +850,7 @@ static int mtk_i2c_do_transfer(struct mt
+       control_reg = mtk_i2c_readw(i2c, OFFSET_CONTROL) &
+                       ~(I2C_CONTROL_DIR_CHANGE | I2C_CONTROL_RS);
+-      if ((i2c->speed_hz > I2C_MAX_FAST_MODE_FREQ) || (left_num >= 1))
++      if ((i2c->speed_hz > I2C_MAX_FAST_MODE_PLUS_FREQ) || (left_num >= 1))
+               control_reg |= I2C_CONTROL_RS;
+       if (i2c->op == I2C_MASTER_WRRD)
+@@ -1067,7 +1067,8 @@ static int mtk_i2c_transfer(struct i2c_a
+               }
+       }
+-      if (i2c->auto_restart && num >= 2 && i2c->speed_hz > I2C_MAX_FAST_MODE_FREQ)
++      if (i2c->auto_restart && num >= 2 &&
++              i2c->speed_hz > I2C_MAX_FAST_MODE_PLUS_FREQ)
+               /* ignore the first restart irq after the master code,
+                * otherwise the first transfer will be discarded.
+                */
diff --git a/queue-5.10/media-rkvdec-remove-of_match_ptr.patch b/queue-5.10/media-rkvdec-remove-of_match_ptr.patch
new file mode 100644 (file)
index 0000000..037bac5
--- /dev/null
@@ -0,0 +1,38 @@
+From c2357dd9cbafc8ed37156e32c24884cfa8380b2f Mon Sep 17 00:00:00 2001
+From: Fabio Estevam <festevam@gmail.com>
+Date: Sat, 20 Mar 2021 13:21:52 +0100
+Subject: media: rkvdec: Remove of_match_ptr()
+
+From: Fabio Estevam <festevam@gmail.com>
+
+commit c2357dd9cbafc8ed37156e32c24884cfa8380b2f upstream.
+
+When building with CONFIG_OF not set, the following clang
+build warning is seen:
+
+>> drivers/staging/media/rkvdec/rkvdec.c:967:34: warning: unused variable 'of_rkvdec_match' [-Wunused-const-variable]
+
+Fix the warning by removing the unnecessary of_match_ptr().
+
+Reported-by: kernel test robot <lkp@intel.com>
+Fixes: cd33c830448b ("media: rkvdec: Add the rkvdec driver")
+Signed-off-by: Fabio Estevam <festevam@gmail.com>
+Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
+Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/staging/media/rkvdec/rkvdec.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/media/rkvdec/rkvdec.c
++++ b/drivers/staging/media/rkvdec/rkvdec.c
+@@ -1107,7 +1107,7 @@ static struct platform_driver rkvdec_dri
+       .remove = rkvdec_remove,
+       .driver = {
+                  .name = "rkvdec",
+-                 .of_match_table = of_match_ptr(of_rkvdec_match),
++                 .of_match_table = of_rkvdec_match,
+                  .pm = &rkvdec_pm_ops,
+       },
+ };
diff --git a/queue-5.10/nvme-do-not-try-to-reconfigure-apst-when-the-controller-is-not-live.patch b/queue-5.10/nvme-do-not-try-to-reconfigure-apst-when-the-controller-is-not-live.patch
new file mode 100644 (file)
index 0000000..7bca81e
--- /dev/null
@@ -0,0 +1,35 @@
+From 53fe2a30bc168db9700e00206d991ff934973cf1 Mon Sep 17 00:00:00 2001
+From: Christoph Hellwig <hch@lst.de>
+Date: Fri, 9 Apr 2021 11:46:12 +0200
+Subject: nvme: do not try to reconfigure APST when the controller is not live
+
+From: Christoph Hellwig <hch@lst.de>
+
+commit 53fe2a30bc168db9700e00206d991ff934973cf1 upstream.
+
+Do not call nvme_configure_apst when the controller is not live, given
+that nvme_configure_apst will fail due the lack of an admin queue when
+the controller is being torn down and nvme_set_latency_tolerance is
+called from dev_pm_qos_hide_latency_tolerance.
+
+Fixes: 510a405d945b("nvme: fix memory leak for power latency tolerance")
+Reported-by: Peng Liu <liupeng17@lenovo.com>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Reviewed-by: Keith Busch <kbusch@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/nvme/host/core.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/nvme/host/core.c
++++ b/drivers/nvme/host/core.c
+@@ -2622,7 +2622,8 @@ static void nvme_set_latency_tolerance(s
+       if (ctrl->ps_max_latency_us != latency) {
+               ctrl->ps_max_latency_us = latency;
+-              nvme_configure_apst(ctrl);
++              if (ctrl->state == NVME_CTRL_LIVE)
++                      nvme_configure_apst(ctrl);
+       }
+ }
index b993ddd4a75fe21743bb60c4994a1a1791d80a8e..9779ffa54319841a559d2a5914d14b3230053ed4 100644 (file)
@@ -278,3 +278,12 @@ drm-i915-gt-fix-a-double-free-in-gen8_preallocate_top_level_pdp.patch
 drm-i915-read-c0drb3-c1drb3-as-16-bits-again.patch
 drm-i915-overlay-fix-active-retire-callback-alignment.patch
 drm-i915-fix-crash-in-auto_retire.patch
+clk-exynos7-mark-aclk_fsys1_200-as-critical.patch
+media-rkvdec-remove-of_match_ptr.patch
+i2c-mediatek-fix-send-master-code-at-more-than-1mhz.patch
+dt-bindings-media-renesas-vin-make-resets-optional-on-r-car-gen1.patch
+dt-bindings-serial-8250-remove-duplicated-compatible-strings.patch
+debugfs-make-debugfs_allow-ro-after-init.patch
+ext4-fix-debug-format-string-warning.patch
+nvme-do-not-try-to-reconfigure-apst-when-the-controller-is-not-live.patch
+asoc-rsnd-check-all-busif-status-when-error.patch