]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Oct 2020 11:17:06 +0000 (12:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Oct 2020 11:17:06 +0000 (12:17 +0100)
added patches:
io_uring-don-t-reuse-linked_timeout.patch
misc-rtsx-do-not-setting-oc_power_down-reg-in-rtsx_pci_init_ocp.patch
phy-marvell-comphy-convert-internal-smcc-firmware-return-codes-to-errno.patch

queue-5.9/io_uring-don-t-reuse-linked_timeout.patch [new file with mode: 0644]
queue-5.9/misc-rtsx-do-not-setting-oc_power_down-reg-in-rtsx_pci_init_ocp.patch [new file with mode: 0644]
queue-5.9/phy-marvell-comphy-convert-internal-smcc-firmware-return-codes-to-errno.patch [new file with mode: 0644]
queue-5.9/series

diff --git a/queue-5.9/io_uring-don-t-reuse-linked_timeout.patch b/queue-5.9/io_uring-don-t-reuse-linked_timeout.patch
new file mode 100644 (file)
index 0000000..b82dfc9
--- /dev/null
@@ -0,0 +1,35 @@
+From ff5771613cd7b3a76cd16cb54aa81d30d3c11d48 Mon Sep 17 00:00:00 2001
+From: Pavel Begunkov <asml.silence@gmail.com>
+Date: Tue, 20 Oct 2020 23:50:27 +0100
+Subject: io_uring: don't reuse linked_timeout
+
+From: Pavel Begunkov <asml.silence@gmail.com>
+
+commit ff5771613cd7b3a76cd16cb54aa81d30d3c11d48 upstream.
+
+Clear linked_timeout for next requests in __io_queue_sqe() so we won't
+queue it up unnecessary when it's going to be punted.
+
+Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
+Cc: stable@vger.kernel.org # v5.9
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/io_uring.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/fs/io_uring.c
++++ b/fs/io_uring.c
+@@ -6249,8 +6249,10 @@ err:
+       if (nxt) {
+               req = nxt;
+-              if (req->flags & REQ_F_FORCE_ASYNC)
++              if (req->flags & REQ_F_FORCE_ASYNC) {
++                      linked_timeout = NULL;
+                       goto punt;
++              }
+               goto again;
+       }
+ exit:
diff --git a/queue-5.9/misc-rtsx-do-not-setting-oc_power_down-reg-in-rtsx_pci_init_ocp.patch b/queue-5.9/misc-rtsx-do-not-setting-oc_power_down-reg-in-rtsx_pci_init_ocp.patch
new file mode 100644 (file)
index 0000000..40a4733
--- /dev/null
@@ -0,0 +1,34 @@
+From 551b6729578a8981c46af964c10bf7d5d9ddca83 Mon Sep 17 00:00:00 2001
+From: Ricky Wu <ricky_wu@realtek.com>
+Date: Mon, 24 Aug 2020 11:00:06 +0800
+Subject: misc: rtsx: do not setting OC_POWER_DOWN reg in rtsx_pci_init_ocp()
+
+From: Ricky Wu <ricky_wu@realtek.com>
+
+commit 551b6729578a8981c46af964c10bf7d5d9ddca83 upstream.
+
+this power saving action in rtsx_pci_init_ocp() cause INTEL-NUC6 platform
+missing card reader
+
+Signed-off-by: Ricky Wu <ricky_wu@realtek.com>
+Link: https://lore.kernel.org/r/20200824030006.30033-1-ricky_wu@realtek.com
+Cc: Chris Clayton <chris2553@googlemail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/misc/cardreader/rtsx_pcr.c |    4 ----
+ 1 file changed, 4 deletions(-)
+
+--- a/drivers/misc/cardreader/rtsx_pcr.c
++++ b/drivers/misc/cardreader/rtsx_pcr.c
+@@ -1155,10 +1155,6 @@ void rtsx_pci_init_ocp(struct rtsx_pcr *
+                       rtsx_pci_write_register(pcr, REG_OCPGLITCH,
+                               SD_OCP_GLITCH_MASK, pcr->hw_param.ocp_glitch);
+                       rtsx_pci_enable_ocp(pcr);
+-              } else {
+-                      /* OC power down */
+-                      rtsx_pci_write_register(pcr, FPDCTL, OC_POWER_DOWN,
+-                              OC_POWER_DOWN);
+               }
+       }
+ }
diff --git a/queue-5.9/phy-marvell-comphy-convert-internal-smcc-firmware-return-codes-to-errno.patch b/queue-5.9/phy-marvell-comphy-convert-internal-smcc-firmware-return-codes-to-errno.patch
new file mode 100644 (file)
index 0000000..38fccc4
--- /dev/null
@@ -0,0 +1,111 @@
+From ea17a0f153af2cd890e4ce517130dcccaa428c13 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
+Date: Wed, 2 Sep 2020 16:43:43 +0200
+Subject: phy: marvell: comphy: Convert internal SMCC firmware return codes to errno
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Pali Rohár <pali@kernel.org>
+
+commit ea17a0f153af2cd890e4ce517130dcccaa428c13 upstream.
+
+Driver ->power_on and ->power_off callbacks leaks internal SMCC firmware
+return codes to phy caller. This patch converts SMCC error codes to
+standard linux errno codes. Include file linux/arm-smccc.h already provides
+defines for SMCC error codes, so use them instead of custom driver defines.
+Note that return value is signed 32bit, but stored in unsigned long type
+with zero padding.
+
+Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com>
+Link: https://lore.kernel.org/r/20200902144344.16684-2-pali@kernel.org
+Signed-off-by: Pali Rohár <pali@kernel.org>
+Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
+Reviewed-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/phy/marvell/phy-mvebu-a3700-comphy.c |   14 +++++++++++---
+ drivers/phy/marvell/phy-mvebu-cp110-comphy.c |   14 +++++++++++---
+ 2 files changed, 22 insertions(+), 6 deletions(-)
+
+--- a/drivers/phy/marvell/phy-mvebu-a3700-comphy.c
++++ b/drivers/phy/marvell/phy-mvebu-a3700-comphy.c
+@@ -26,7 +26,6 @@
+ #define COMPHY_SIP_POWER_ON                   0x82000001
+ #define COMPHY_SIP_POWER_OFF                  0x82000002
+ #define COMPHY_SIP_PLL_LOCK                   0x82000003
+-#define COMPHY_FW_NOT_SUPPORTED                       (-1)
+ #define COMPHY_FW_MODE_SATA                   0x1
+ #define COMPHY_FW_MODE_SGMII                  0x2
+@@ -112,10 +111,19 @@ static int mvebu_a3700_comphy_smc(unsign
+                                 unsigned long mode)
+ {
+       struct arm_smccc_res res;
++      s32 ret;
+       arm_smccc_smc(function, lane, mode, 0, 0, 0, 0, 0, &res);
++      ret = res.a0;
+-      return res.a0;
++      switch (ret) {
++      case SMCCC_RET_SUCCESS:
++              return 0;
++      case SMCCC_RET_NOT_SUPPORTED:
++              return -EOPNOTSUPP;
++      default:
++              return -EINVAL;
++      }
+ }
+ static int mvebu_a3700_comphy_get_fw_mode(int lane, int port,
+@@ -220,7 +228,7 @@ static int mvebu_a3700_comphy_power_on(s
+       }
+       ret = mvebu_a3700_comphy_smc(COMPHY_SIP_POWER_ON, lane->id, fw_param);
+-      if (ret == COMPHY_FW_NOT_SUPPORTED)
++      if (ret == -EOPNOTSUPP)
+               dev_err(lane->dev,
+                       "unsupported SMC call, try updating your firmware\n");
+--- a/drivers/phy/marvell/phy-mvebu-cp110-comphy.c
++++ b/drivers/phy/marvell/phy-mvebu-cp110-comphy.c
+@@ -123,7 +123,6 @@
+ #define COMPHY_SIP_POWER_ON   0x82000001
+ #define COMPHY_SIP_POWER_OFF  0x82000002
+-#define COMPHY_FW_NOT_SUPPORTED       (-1)
+ /*
+  * A lane is described by the following bitfields:
+@@ -273,10 +272,19 @@ static int mvebu_comphy_smc(unsigned lon
+                           unsigned long lane, unsigned long mode)
+ {
+       struct arm_smccc_res res;
++      s32 ret;
+       arm_smccc_smc(function, phys, lane, mode, 0, 0, 0, 0, &res);
++      ret = res.a0;
+-      return res.a0;
++      switch (ret) {
++      case SMCCC_RET_SUCCESS:
++              return 0;
++      case SMCCC_RET_NOT_SUPPORTED:
++              return -EOPNOTSUPP;
++      default:
++              return -EINVAL;
++      }
+ }
+ static int mvebu_comphy_get_mode(bool fw_mode, int lane, int port,
+@@ -819,7 +827,7 @@ static int mvebu_comphy_power_on(struct
+       if (!ret)
+               return ret;
+-      if (ret == COMPHY_FW_NOT_SUPPORTED)
++      if (ret == -EOPNOTSUPP)
+               dev_err(priv->dev,
+                       "unsupported SMC call, try updating your firmware\n");
index 15ab230a4d40e7a74d2582f4abf20c62b8138421..749b128297928794ab72ad76b6eb8d3a66ade1ff 100644 (file)
@@ -69,3 +69,6 @@ pm-runtime-fix-timer_expires-data-type-on-32-bit-arches.patch
 ata-sata_rcar-fix-dma-boundary-mask.patch
 mm-mark-async-iocb-read-as-nowait-once-some-data-has-been-copied.patch
 xen-gntdev.c-mark-pages-as-dirty.patch
+io_uring-don-t-reuse-linked_timeout.patch
+misc-rtsx-do-not-setting-oc_power_down-reg-in-rtsx_pci_init_ocp.patch
+phy-marvell-comphy-convert-internal-smcc-firmware-return-codes-to-errno.patch