]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Sep 2022 10:04:51 +0000 (12:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Sep 2022 10:04:51 +0000 (12:04 +0200)
added patches:
thunderbolt-check-router-generation-before-connecting-xhci.patch
thunderbolt-use-the-actual-buffer-in-tb_async_error.patch
usb-dwc3-pci-add-support-for-intel-raptor-lake.patch
xen-blkback-advertise-feature-persistent-as-user-requested.patch
xen-blkfront-advertise-feature-persistent-as-user-requested.patch
xen-blkfront-cache-feature_persistent-value-before-advertisement.patch

queue-5.19/series
queue-5.19/thunderbolt-check-router-generation-before-connecting-xhci.patch [new file with mode: 0644]
queue-5.19/thunderbolt-use-the-actual-buffer-in-tb_async_error.patch [new file with mode: 0644]
queue-5.19/usb-dwc3-pci-add-support-for-intel-raptor-lake.patch [new file with mode: 0644]
queue-5.19/xen-blkback-advertise-feature-persistent-as-user-requested.patch [new file with mode: 0644]
queue-5.19/xen-blkfront-advertise-feature-persistent-as-user-requested.patch [new file with mode: 0644]
queue-5.19/xen-blkfront-cache-feature_persistent-value-before-advertisement.patch [new file with mode: 0644]

index b871e73bfbc97c9079a31c38e85f8177f501e718..8b7a36e68ee4152c386f0dc9182a951b8bd7e793 100644 (file)
@@ -99,3 +99,9 @@ kvm-x86-mask-off-unsupported-and-unknown-bits-of-ia3.patch
 powerpc-papr_scm-ensure-rc-is-always-initialized-in-.patch
 xen-grants-prevent-integer-overflow-in-gnttab_dma_al.patch
 mm-pagewalk-fix-race-between-unmap-and-page-walker.patch
+xen-blkback-advertise-feature-persistent-as-user-requested.patch
+xen-blkfront-advertise-feature-persistent-as-user-requested.patch
+xen-blkfront-cache-feature_persistent-value-before-advertisement.patch
+thunderbolt-use-the-actual-buffer-in-tb_async_error.patch
+thunderbolt-check-router-generation-before-connecting-xhci.patch
+usb-dwc3-pci-add-support-for-intel-raptor-lake.patch
diff --git a/queue-5.19/thunderbolt-check-router-generation-before-connecting-xhci.patch b/queue-5.19/thunderbolt-check-router-generation-before-connecting-xhci.patch
new file mode 100644 (file)
index 0000000..0449a4f
--- /dev/null
@@ -0,0 +1,44 @@
+From 93a3c0d4e8bfbb15145e5dd7da68a3de4b904aba Mon Sep 17 00:00:00 2001
+From: Mika Westerberg <mika.westerberg@linux.intel.com>
+Date: Tue, 14 Jun 2022 18:53:59 +0300
+Subject: thunderbolt: Check router generation before connecting xHCI
+
+From: Mika Westerberg <mika.westerberg@linux.intel.com>
+
+commit 93a3c0d4e8bfbb15145e5dd7da68a3de4b904aba upstream.
+
+Only Thunderbolt 3 routers need the xHCI connection flow. This also
+ensures the router actually has both lane adapters (1 and 3). While
+there move declaration of the boolean variables inside the block where
+they are being used.
+
+Fixes: 30a4eca69b76 ("thunderbolt: Add internal xHCI connect flows for Thunderbolt 3 devices")
+Cc: stable@vger.kernel.org
+Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/thunderbolt/switch.c |    6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/drivers/thunderbolt/switch.c
++++ b/drivers/thunderbolt/switch.c
+@@ -3781,14 +3781,18 @@ int tb_switch_pcie_l1_enable(struct tb_s
+  */
+ int tb_switch_xhci_connect(struct tb_switch *sw)
+ {
+-      bool usb_port1, usb_port3, xhci_port1, xhci_port3;
+       struct tb_port *port1, *port3;
+       int ret;
++      if (sw->generation != 3)
++              return 0;
++
+       port1 = &sw->ports[1];
+       port3 = &sw->ports[3];
+       if (tb_switch_is_alpine_ridge(sw)) {
++              bool usb_port1, usb_port3, xhci_port1, xhci_port3;
++
+               usb_port1 = tb_lc_is_usb_plugged(port1);
+               usb_port3 = tb_lc_is_usb_plugged(port3);
+               xhci_port1 = tb_lc_is_xhci_connected(port1);
diff --git a/queue-5.19/thunderbolt-use-the-actual-buffer-in-tb_async_error.patch b/queue-5.19/thunderbolt-use-the-actual-buffer-in-tb_async_error.patch
new file mode 100644 (file)
index 0000000..ec4b1cf
--- /dev/null
@@ -0,0 +1,31 @@
+From eb100b8fa8e8b59eb3e5fc7a5fd4a1e3c5950f64 Mon Sep 17 00:00:00 2001
+From: Mika Westerberg <mika.westerberg@linux.intel.com>
+Date: Fri, 29 Apr 2022 17:10:17 +0300
+Subject: thunderbolt: Use the actual buffer in tb_async_error()
+
+From: Mika Westerberg <mika.westerberg@linux.intel.com>
+
+commit eb100b8fa8e8b59eb3e5fc7a5fd4a1e3c5950f64 upstream.
+
+The received notification packet is held in pkg->buffer and not in pkg
+itself. Fix this by using the correct buffer.
+
+Fixes: 81a54b5e1986 ("thunderbolt: Let the connection manager handle all notifications")
+Cc: stable@vger.kernel.org
+Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/thunderbolt/ctl.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/thunderbolt/ctl.c
++++ b/drivers/thunderbolt/ctl.c
+@@ -407,7 +407,7 @@ static void tb_ctl_rx_submit(struct ctl_
+ static int tb_async_error(const struct ctl_pkg *pkg)
+ {
+-      const struct cfg_error_pkg *error = (const struct cfg_error_pkg *)pkg;
++      const struct cfg_error_pkg *error = pkg->buffer;
+       if (pkg->frame.eof != TB_CFG_PKG_ERROR)
+               return false;
diff --git a/queue-5.19/usb-dwc3-pci-add-support-for-intel-raptor-lake.patch b/queue-5.19/usb-dwc3-pci-add-support-for-intel-raptor-lake.patch
new file mode 100644 (file)
index 0000000..5ff0f73
--- /dev/null
@@ -0,0 +1,42 @@
+From bad0d1d726ace2db9e0f39c62b173bc7cc43dd6a Mon Sep 17 00:00:00 2001
+From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Date: Mon, 15 Aug 2022 15:33:34 +0300
+Subject: usb: dwc3: pci: Add support for Intel Raptor Lake
+
+From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+
+commit bad0d1d726ace2db9e0f39c62b173bc7cc43dd6a upstream.
+
+This adds the necessary PCI device ID for the controller
+inside the Intel Raptor Lake CPU block. The controllers that
+are part of the PCH (chipset) have separate device IDs.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Link: https://lore.kernel.org/r/20220815123334.87526-1-heikki.krogerus@linux.intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/dwc3/dwc3-pci.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/usb/dwc3/dwc3-pci.c
++++ b/drivers/usb/dwc3/dwc3-pci.c
+@@ -44,6 +44,7 @@
+ #define PCI_DEVICE_ID_INTEL_ADLP              0x51ee
+ #define PCI_DEVICE_ID_INTEL_ADLM              0x54ee
+ #define PCI_DEVICE_ID_INTEL_ADLS              0x7ae1
++#define PCI_DEVICE_ID_INTEL_RPL                       0x460e
+ #define PCI_DEVICE_ID_INTEL_RPLS              0x7a61
+ #define PCI_DEVICE_ID_INTEL_MTLP              0x7ec1
+ #define PCI_DEVICE_ID_INTEL_MTL                       0x7e7e
+@@ -456,6 +457,9 @@ static const struct pci_device_id dwc3_p
+       { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ADLS),
+         (kernel_ulong_t) &dwc3_pci_intel_swnode, },
++      { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_RPL),
++        (kernel_ulong_t) &dwc3_pci_intel_swnode, },
++
+       { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_RPLS),
+         (kernel_ulong_t) &dwc3_pci_intel_swnode, },
diff --git a/queue-5.19/xen-blkback-advertise-feature-persistent-as-user-requested.patch b/queue-5.19/xen-blkback-advertise-feature-persistent-as-user-requested.patch
new file mode 100644 (file)
index 0000000..9916d80
--- /dev/null
@@ -0,0 +1,73 @@
+From 06ba5d2e943e97bb66e75c152e87f1d2c7027a67 Mon Sep 17 00:00:00 2001
+From: SeongJae Park <sj@kernel.org>
+Date: Wed, 31 Aug 2022 16:58:22 +0000
+Subject: xen-blkback: Advertise feature-persistent as user requested
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: SeongJae Park <sj@kernel.org>
+
+commit 06ba5d2e943e97bb66e75c152e87f1d2c7027a67 upstream.
+
+The advertisement of the persistent grants feature (writing
+'feature-persistent' to xenbus) should mean not the decision for using
+the feature but only the availability of the feature.  However, commit
+aac8a70db24b ("xen-blkback: add a parameter for disabling of persistent
+grants") made a field of blkback, which was a place for saving only the
+negotiation result, to be used for yet another purpose: caching of the
+'feature_persistent' parameter value.  As a result, the advertisement,
+which should follow only the parameter value, becomes inconsistent.
+
+This commit fixes the misuse of the semantic by making blkback saves the
+parameter value in a separate place and advertises the support based on
+only the saved value.
+
+Fixes: aac8a70db24b ("xen-blkback: add a parameter for disabling of persistent grants")
+Cc: <stable@vger.kernel.org> # 5.10.x
+Suggested-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: SeongJae Park <sj@kernel.org>
+Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
+Reviewed-by: Juergen Gross <jgross@suse.com>
+Link: https://lore.kernel.org/r/20220831165824.94815-2-sj@kernel.org
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/block/xen-blkback/common.h |    3 +++
+ drivers/block/xen-blkback/xenbus.c |    6 ++++--
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+--- a/drivers/block/xen-blkback/common.h
++++ b/drivers/block/xen-blkback/common.h
+@@ -226,6 +226,9 @@ struct xen_vbd {
+       sector_t                size;
+       unsigned int            flush_support:1;
+       unsigned int            discard_secure:1;
++      /* Connect-time cached feature_persistent parameter value */
++      unsigned int            feature_gnt_persistent_parm:1;
++      /* Persistent grants feature negotiation result */
+       unsigned int            feature_gnt_persistent:1;
+       unsigned int            overflow_max_grants:1;
+ };
+--- a/drivers/block/xen-blkback/xenbus.c
++++ b/drivers/block/xen-blkback/xenbus.c
+@@ -907,7 +907,7 @@ again:
+       xen_blkbk_barrier(xbt, be, be->blkif->vbd.flush_support);
+       err = xenbus_printf(xbt, dev->nodename, "feature-persistent", "%u",
+-                      be->blkif->vbd.feature_gnt_persistent);
++                      be->blkif->vbd.feature_gnt_persistent_parm);
+       if (err) {
+               xenbus_dev_fatal(dev, err, "writing %s/feature-persistent",
+                                dev->nodename);
+@@ -1085,7 +1085,9 @@ static int connect_ring(struct backend_i
+               return -ENOSYS;
+       }
+-      blkif->vbd.feature_gnt_persistent = feature_persistent &&
++      blkif->vbd.feature_gnt_persistent_parm = feature_persistent;
++      blkif->vbd.feature_gnt_persistent =
++              blkif->vbd.feature_gnt_persistent_parm &&
+               xenbus_read_unsigned(dev->otherend, "feature-persistent", 0);
+       blkif->vbd.overflow_max_grants = 0;
diff --git a/queue-5.19/xen-blkfront-advertise-feature-persistent-as-user-requested.patch b/queue-5.19/xen-blkfront-advertise-feature-persistent-as-user-requested.patch
new file mode 100644 (file)
index 0000000..284eff4
--- /dev/null
@@ -0,0 +1,69 @@
+From 9f5e0fe5d05f7e8de7f39b2b10089834eb0ff787 Mon Sep 17 00:00:00 2001
+From: SeongJae Park <sj@kernel.org>
+Date: Wed, 31 Aug 2022 16:58:23 +0000
+Subject: xen-blkfront: Advertise feature-persistent as user requested
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: SeongJae Park <sj@kernel.org>
+
+commit 9f5e0fe5d05f7e8de7f39b2b10089834eb0ff787 upstream.
+
+The advertisement of the persistent grants feature (writing
+'feature-persistent' to xenbus) should mean not the decision for using
+the feature but only the availability of the feature.  However, commit
+74a852479c68 ("xen-blkfront: add a parameter for disabling of persistent
+grants") made a field of blkfront, which was a place for saving only the
+negotiation result, to be used for yet another purpose: caching of the
+'feature_persistent' parameter value.  As a result, the advertisement,
+which should follow only the parameter value, becomes inconsistent.
+
+This commit fixes the misuse of the semantic by making blkfront saves
+the parameter value in a separate place and advertises the support based
+on only the saved value.
+
+Fixes: 74a852479c68 ("xen-blkfront: add a parameter for disabling of persistent grants")
+Cc: <stable@vger.kernel.org> # 5.10.x
+Suggested-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: SeongJae Park <sj@kernel.org>
+Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
+Reviewed-by: Juergen Gross <jgross@suse.com>
+Link: https://lore.kernel.org/r/20220831165824.94815-3-sj@kernel.org
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/block/xen-blkfront.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/block/xen-blkfront.c
++++ b/drivers/block/xen-blkfront.c
+@@ -213,6 +213,9 @@ struct blkfront_info
+       unsigned int feature_fua:1;
+       unsigned int feature_discard:1;
+       unsigned int feature_secdiscard:1;
++      /* Connect-time cached feature_persistent parameter */
++      unsigned int feature_persistent_parm:1;
++      /* Persistent grants feature negotiation result */
+       unsigned int feature_persistent:1;
+       unsigned int bounce:1;
+       unsigned int discard_granularity;
+@@ -1848,7 +1851,7 @@ again:
+               goto abort_transaction;
+       }
+       err = xenbus_printf(xbt, dev->nodename, "feature-persistent", "%u",
+-                      info->feature_persistent);
++                      info->feature_persistent_parm);
+       if (err)
+               dev_warn(&dev->dev,
+                        "writing persistent grants feature to xenbus");
+@@ -2281,7 +2284,8 @@ static void blkfront_gather_backend_feat
+       if (xenbus_read_unsigned(info->xbdev->otherend, "feature-discard", 0))
+               blkfront_setup_discard(info);
+-      if (feature_persistent)
++      info->feature_persistent_parm = feature_persistent;
++      if (info->feature_persistent_parm)
+               info->feature_persistent =
+                       !!xenbus_read_unsigned(info->xbdev->otherend,
+                                              "feature-persistent", 0);
diff --git a/queue-5.19/xen-blkfront-cache-feature_persistent-value-before-advertisement.patch b/queue-5.19/xen-blkfront-cache-feature_persistent-value-before-advertisement.patch
new file mode 100644 (file)
index 0000000..9b48bf8
--- /dev/null
@@ -0,0 +1,87 @@
+From fe8f65b018effbf473f53af3538d0c1878b8b329 Mon Sep 17 00:00:00 2001
+From: SeongJae Park <sj@kernel.org>
+Date: Wed, 31 Aug 2022 16:58:24 +0000
+Subject: xen-blkfront: Cache feature_persistent value before advertisement
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: SeongJae Park <sj@kernel.org>
+
+commit fe8f65b018effbf473f53af3538d0c1878b8b329 upstream.
+
+Xen blkfront advertises its support of the persistent grants feature
+when it first setting up and when resuming in 'talk_to_blkback()'.
+Then, blkback reads the advertised value when it connects with blkfront
+and decides if it will use the persistent grants feature or not, and
+advertises its decision to blkfront.  Blkfront reads the blkback's
+decision and it also makes the decision for the use of the feature.
+
+Commit 402c43ea6b34 ("xen-blkfront: Apply 'feature_persistent' parameter
+when connect"), however, made the blkfront's read of the parameter for
+disabling the advertisement, namely 'feature_persistent', to be done
+when it negotiate, not when advertise.  Therefore blkfront advertises
+without reading the parameter.  As the field for caching the parameter
+value is zero-initialized, it always advertises as the feature is
+disabled, so that the persistent grants feature becomes always disabled.
+
+This commit fixes the issue by making the blkfront does parmeter caching
+just before the advertisement.
+
+Fixes: 402c43ea6b34 ("xen-blkfront: Apply 'feature_persistent' parameter when connect")
+Cc: <stable@vger.kernel.org> # 5.10.x
+Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
+Signed-off-by: SeongJae Park <sj@kernel.org>
+Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
+Reviewed-by: Juergen Gross <jgross@suse.com>
+Link: https://lore.kernel.org/r/20220831165824.94815-4-sj@kernel.org
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/block/xen-blkfront.c |   14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+--- a/drivers/block/xen-blkfront.c
++++ b/drivers/block/xen-blkfront.c
+@@ -1759,6 +1759,12 @@ abort_transaction:
+       return err;
+ }
++/* Enable the persistent grants feature. */
++static bool feature_persistent = true;
++module_param(feature_persistent, bool, 0644);
++MODULE_PARM_DESC(feature_persistent,
++              "Enables the persistent grants feature");
++
+ /* Common code used when first setting up, and when resuming. */
+ static int talk_to_blkback(struct xenbus_device *dev,
+                          struct blkfront_info *info)
+@@ -1850,6 +1856,7 @@ again:
+               message = "writing protocol";
+               goto abort_transaction;
+       }
++      info->feature_persistent_parm = feature_persistent;
+       err = xenbus_printf(xbt, dev->nodename, "feature-persistent", "%u",
+                       info->feature_persistent_parm);
+       if (err)
+@@ -1919,12 +1926,6 @@ static int negotiate_mq(struct blkfront_
+       return 0;
+ }
+-/* Enable the persistent grants feature. */
+-static bool feature_persistent = true;
+-module_param(feature_persistent, bool, 0644);
+-MODULE_PARM_DESC(feature_persistent,
+-              "Enables the persistent grants feature");
+-
+ /*
+  * Entry point to this code when a new device is created.  Allocate the basic
+  * structures and the ring buffer for communication with the backend, and
+@@ -2284,7 +2285,6 @@ static void blkfront_gather_backend_feat
+       if (xenbus_read_unsigned(info->xbdev->otherend, "feature-discard", 0))
+               blkfront_setup_discard(info);
+-      info->feature_persistent_parm = feature_persistent;
+       if (info->feature_persistent_parm)
+               info->feature_persistent =
+                       !!xenbus_read_unsigned(info->xbdev->otherend,