]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.8-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 May 2024 11:35:49 +0000 (13:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 May 2024 11:35:49 +0000 (13:35 +0200)
added patches:
reapply-drm-qxl-simplify-qxl_fence_wait.patch

queue-6.8/bluetooth-qca-fix-invalid-device-address-check.patch [deleted file]
queue-6.8/reapply-drm-qxl-simplify-qxl_fence_wait.patch [new file with mode: 0644]
queue-6.8/series

diff --git a/queue-6.8/bluetooth-qca-fix-invalid-device-address-check.patch b/queue-6.8/bluetooth-qca-fix-invalid-device-address-check.patch
deleted file mode 100644 (file)
index 9c0d8e0..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-From 2179ab410adb7c29e2feed5d1c15138e23b5e76e Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Tue, 16 Apr 2024 11:15:09 +0200
-Subject: Bluetooth: qca: fix invalid device address check
-
-From: Johan Hovold <johan+linaro@kernel.org>
-
-[ Upstream commit 32868e126c78876a8a5ddfcb6ac8cb2fffcf4d27 ]
-
-Qualcomm Bluetooth controllers may not have been provisioned with a
-valid device address and instead end up using the default address
-00:00:00:00:5a:ad.
-
-This was previously believed to be due to lack of persistent storage for
-the address but it may also be due to integrators opting to not use the
-on-chip OTP memory and instead store the address elsewhere (e.g. in
-storage managed by secure world firmware).
-
-According to Qualcomm, at least WCN6750, WCN6855 and WCN7850 have
-on-chip OTP storage for the address.
-
-As the device type alone cannot be used to determine when the address is
-valid, instead read back the address during setup() and only set the
-HCI_QUIRK_USE_BDADDR_PROPERTY flag when needed.
-
-This specifically makes sure that controllers that have been provisioned
-with an address do not start as unconfigured.
-
-Reported-by: Janaki Ramaiah Thota <quic_janathot@quicinc.com>
-Link: https://lore.kernel.org/r/124a7d54-5a18-4be7-9a76-a12017f6cce5@quicinc.com/
-Fixes: 5971752de44c ("Bluetooth: hci_qca: Set HCI_QUIRK_USE_BDADDR_PROPERTY for wcn3990")
-Fixes: e668eb1e1578 ("Bluetooth: hci_core: Don't stop BT if the BD address missing in dts")
-Fixes: 6945795bc81a ("Bluetooth: fix use-bdaddr-property quirk")
-Cc: stable@vger.kernel.org     # 6.5
-Cc: Matthias Kaehlcke <mka@chromium.org>
-Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
-Reported-by: Janaki Ramaiah Thota <quic_janathot@quicinc.com>
-Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/bluetooth/btqca.c   | 38 +++++++++++++++++++++++++++++++++++++
- drivers/bluetooth/hci_qca.c |  2 --
- 2 files changed, 38 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
-index 19cfc342fc7bb..216826c31ee34 100644
---- a/drivers/bluetooth/btqca.c
-+++ b/drivers/bluetooth/btqca.c
-@@ -15,6 +15,8 @@
- #define VERSION "0.1"
-+#define QCA_BDADDR_DEFAULT (&(bdaddr_t) {{ 0xad, 0x5a, 0x00, 0x00, 0x00, 0x00 }})
-+
- int qca_read_soc_version(struct hci_dev *hdev, struct qca_btsoc_version *ver,
-                        enum qca_btsoc_type soc_type)
- {
-@@ -612,6 +614,38 @@ int qca_set_bdaddr_rome(struct hci_dev *hdev, const bdaddr_t *bdaddr)
- }
- EXPORT_SYMBOL_GPL(qca_set_bdaddr_rome);
-+static int qca_check_bdaddr(struct hci_dev *hdev)
-+{
-+      struct hci_rp_read_bd_addr *bda;
-+      struct sk_buff *skb;
-+      int err;
-+
-+      if (bacmp(&hdev->public_addr, BDADDR_ANY))
-+              return 0;
-+
-+      skb = __hci_cmd_sync(hdev, HCI_OP_READ_BD_ADDR, 0, NULL,
-+                           HCI_INIT_TIMEOUT);
-+      if (IS_ERR(skb)) {
-+              err = PTR_ERR(skb);
-+              bt_dev_err(hdev, "Failed to read device address (%d)", err);
-+              return err;
-+      }
-+
-+      if (skb->len != sizeof(*bda)) {
-+              bt_dev_err(hdev, "Device address length mismatch");
-+              kfree_skb(skb);
-+              return -EIO;
-+      }
-+
-+      bda = (struct hci_rp_read_bd_addr *)skb->data;
-+      if (!bacmp(&bda->bdaddr, QCA_BDADDR_DEFAULT))
-+              set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
-+
-+      kfree_skb(skb);
-+
-+      return 0;
-+}
-+
- static void qca_generate_hsp_nvm_name(char *fwname, size_t max_size,
-               struct qca_btsoc_version ver, u8 rom_ver, u16 bid)
- {
-@@ -818,6 +852,10 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
-               break;
-       }
-+      err = qca_check_bdaddr(hdev);
-+      if (err)
-+              return err;
-+
-       bt_dev_info(hdev, "QCA setup on UART is completed");
-       return 0;
-diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
-index ce5c2aa743b08..0c9c9ee56592d 100644
---- a/drivers/bluetooth/hci_qca.c
-+++ b/drivers/bluetooth/hci_qca.c
-@@ -1908,8 +1908,6 @@ static int qca_setup(struct hci_uart *hu)
-       case QCA_WCN6750:
-       case QCA_WCN6855:
-       case QCA_WCN7850:
--              set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
--
-               qcadev = serdev_device_get_drvdata(hu->serdev);
-               if (qcadev->bdaddr_property_broken)
-                       set_bit(HCI_QUIRK_BDADDR_PROPERTY_BROKEN, &hdev->quirks);
--- 
-2.43.0
-
diff --git a/queue-6.8/reapply-drm-qxl-simplify-qxl_fence_wait.patch b/queue-6.8/reapply-drm-qxl-simplify-qxl_fence_wait.patch
new file mode 100644 (file)
index 0000000..91bb572
--- /dev/null
@@ -0,0 +1,126 @@
+From 3628e0383dd349f02f882e612ab6184e4bb3dc10 Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Mon, 6 May 2024 13:28:59 -0700
+Subject: Reapply "drm/qxl: simplify qxl_fence_wait"
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit 3628e0383dd349f02f882e612ab6184e4bb3dc10 upstream.
+
+This reverts commit 07ed11afb68d94eadd4ffc082b97c2331307c5ea.
+
+Stephen Rostedt reports:
+ "I went to run my tests on my VMs and the tests hung on boot up.
+  Unfortunately, the most I ever got out was:
+
+  [   93.607888] Testing event system initcall: OK
+  [   93.667730] Running tests on all trace events:
+  [   93.669757] Testing all events: OK
+  [   95.631064] ------------[ cut here ]------------
+  Timed out after 60 seconds"
+
+and further debugging points to a possible circular locking dependency
+between the console_owner locking and the worker pool locking.
+
+Reverting the commit allows Steve's VM to boot to completion again.
+
+[ This may obviously result in the "[TTM] Buffer eviction failed"
+  messages again, which was the reason for that original revert. But at
+  this point this seems preferable to a non-booting system... ]
+
+Reported-and-bisected-by: Steven Rostedt <rostedt@goodmis.org>
+Link: https://lore.kernel.org/all/20240502081641.457aa25f@gandalf.local.home/
+Acked-by: Maxime Ripard <mripard@kernel.org>
+Cc: Alex Constantino <dreaming.about.electric.sheep@gmail.com>
+Cc: Maxime Ripard <mripard@kernel.org>
+Cc: Timo Lindfors <timo.lindfors@iki.fi>
+Cc: Dave Airlie <airlied@redhat.com>
+Cc: Gerd Hoffmann <kraxel@redhat.com>
+Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
+Cc: Thomas Zimmermann <tzimmermann@suse.de>
+Cc: Daniel Vetter <daniel@ffwll.ch>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/qxl/qxl_release.c |   50 +++-----------------------------------
+ include/linux/dma-fence.h         |    7 -----
+ 2 files changed, 5 insertions(+), 52 deletions(-)
+
+--- a/drivers/gpu/drm/qxl/qxl_release.c
++++ b/drivers/gpu/drm/qxl/qxl_release.c
+@@ -58,56 +58,16 @@ static long qxl_fence_wait(struct dma_fe
+                          signed long timeout)
+ {
+       struct qxl_device *qdev;
+-      struct qxl_release *release;
+-      int count = 0, sc = 0;
+-      bool have_drawable_releases;
+       unsigned long cur, end = jiffies + timeout;
+       qdev = container_of(fence->lock, struct qxl_device, release_lock);
+-      release = container_of(fence, struct qxl_release, base);
+-      have_drawable_releases = release->type == QXL_RELEASE_DRAWABLE;
+-retry:
+-      sc++;
+-
+-      if (dma_fence_is_signaled(fence))
+-              goto signaled;
+-
+-      qxl_io_notify_oom(qdev);
+-
+-      for (count = 0; count < 11; count++) {
+-              if (!qxl_queue_garbage_collect(qdev, true))
+-                      break;
+-
+-              if (dma_fence_is_signaled(fence))
+-                      goto signaled;
+-      }
+-
+-      if (dma_fence_is_signaled(fence))
+-              goto signaled;
+-
+-      if (have_drawable_releases || sc < 4) {
+-              if (sc > 2)
+-                      /* back off */
+-                      usleep_range(500, 1000);
+-
+-              if (time_after(jiffies, end))
+-                      return 0;
+-
+-              if (have_drawable_releases && sc > 300) {
+-                      DMA_FENCE_WARN(fence,
+-                                     "failed to wait on release %llu after spincount %d\n",
+-                                     fence->context & ~0xf0000000, sc);
+-                      goto signaled;
+-              }
+-              goto retry;
+-      }
+-      /*
+-       * yeah, original sync_obj_wait gave up after 3 spins when
+-       * have_drawable_releases is not set.
+-       */
++      if (!wait_event_timeout(qdev->release_event,
++                              (dma_fence_is_signaled(fence) ||
++                               (qxl_io_notify_oom(qdev), 0)),
++                              timeout))
++              return 0;
+-signaled:
+       cur = jiffies;
+       if (time_after(cur, end))
+               return 0;
+--- a/include/linux/dma-fence.h
++++ b/include/linux/dma-fence.h
+@@ -682,11 +682,4 @@ static inline bool dma_fence_is_containe
+       return dma_fence_is_array(fence) || dma_fence_is_chain(fence);
+ }
+-#define DMA_FENCE_WARN(f, fmt, args...) \
+-      do {                                                            \
+-              struct dma_fence *__ff = (f);                           \
+-              pr_warn("f %llu#%llu: " fmt, __ff->context, __ff->seqno,\
+-                       ##args);                                       \
+-      } while (0)
+-
+ #endif /* __LINUX_DMA_FENCE_H */
index bf570d0467ecec2fca0c77e70cdfbb7f31c4914f..ebdfccc3b34b8c22ba4656b85b5351be326eb5a5 100644 (file)
@@ -1,7 +1,6 @@
 rust-module-place-generated-init_module-function-in-.patch
 rust-macros-fix-soundness-issue-in-module-macro.patch
 wifi-nl80211-don-t-free-null-coalescing-rule.patch
-bluetooth-qca-fix-invalid-device-address-check.patch
 pinctrl-pinctrl-aspeed-g6-fix-register-offset-for-pi.patch
 pinctrl-meson-fix-typo-in-pdm-s-pin-name.patch
 pinctrl-core-delete-incorrect-free-in-pinctrl_enable.patch
@@ -242,3 +241,4 @@ drm-amd-display-atom-integrated-system-info-v2_2-for.patch
 drm-amdgpu-fix-comparison-in-amdgpu_res_cpu_visible.patch
 drm-amdgpu-once-more-fix-the-call-oder-in-amdgpu_ttm_move-v2.patch
 firewire-nosy-ensure-user_length-is-taken-into-account-when-fetching-packet-contents.patch
+reapply-drm-qxl-simplify-qxl_fence_wait.patch