]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Apr 2024 21:54:12 +0000 (14:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Apr 2024 21:54:12 +0000 (14:54 -0700)
added patches:
selftests-kselftest-fix-build-failure-with-nolibc.patch
thunderbolt-reset-only-non-usb4-host-routers-in-resume.patch

queue-6.6/selftests-kselftest-fix-build-failure-with-nolibc.patch [new file with mode: 0644]
queue-6.6/series
queue-6.6/thunderbolt-reset-only-non-usb4-host-routers-in-resume.patch [new file with mode: 0644]

diff --git a/queue-6.6/selftests-kselftest-fix-build-failure-with-nolibc.patch b/queue-6.6/selftests-kselftest-fix-build-failure-with-nolibc.patch
new file mode 100644 (file)
index 0000000..eb6e569
--- /dev/null
@@ -0,0 +1,44 @@
+From 16767502aa990cca2cb7d1372b31d328c4c85b40 Mon Sep 17 00:00:00 2001
+From: Oleg Nesterov <oleg@redhat.com>
+Date: Fri, 12 Apr 2024 14:35:36 +0200
+Subject: selftests: kselftest: Fix build failure with NOLIBC
+
+From: Oleg Nesterov <oleg@redhat.com>
+
+commit 16767502aa990cca2cb7d1372b31d328c4c85b40 upstream.
+
+As Mark explains ksft_min_kernel_version() can't be compiled with nolibc,
+it doesn't implement uname().
+
+Fixes: 6d029c25b71f ("selftests/timers/posix_timers: Reimplement check_timer_distribution()")
+Reported-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Oleg Nesterov <oleg@redhat.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Link: https://lore.kernel.org/r/20240412123536.GA32444@redhat.com
+Closes: https://lore.kernel.org/all/f0523b3a-ea08-4615-b0fb-5b504a2d39df@sirena.org.uk/
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/selftests/kselftest.h |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/tools/testing/selftests/kselftest.h
++++ b/tools/testing/selftests/kselftest.h
+@@ -331,6 +331,10 @@ static inline int ksft_exit_skip(const c
+ static inline int ksft_min_kernel_version(unsigned int min_major,
+                                         unsigned int min_minor)
+ {
++#ifdef NOLIBC
++      ksft_print_msg("NOLIBC: Can't check kernel version: Function not implemented\n");
++      return 0;
++#else
+       unsigned int major, minor;
+       struct utsname info;
+@@ -338,6 +342,7 @@ static inline int ksft_min_kernel_versio
+               ksft_exit_fail_msg("Can't parse kernel version\n");
+       return major > min_major || (major == min_major && minor >= min_minor);
++#endif
+ }
+ #endif /* __KSELFTEST_H */
index 3d5b9d1b9c80c65e852e252701c7ebe7f3f927ca..838b413cc699f7cf9edc2e19bd9ae761cb67f888 100644 (file)
@@ -156,3 +156,5 @@ ksmbd-validate-request-buffer-size-in-smb2_allocate_rsp_buf.patch
 ksmbd-clear-rename_noreplace-before-calling-vfs_rename.patch
 ksmbd-common-use-struct_group_attr-instead-of-struct_group-for-network_open_info.patch
 pci-aspm-fix-deadlock-when-enabling-aspm.patch
+thunderbolt-reset-only-non-usb4-host-routers-in-resume.patch
+selftests-kselftest-fix-build-failure-with-nolibc.patch
diff --git a/queue-6.6/thunderbolt-reset-only-non-usb4-host-routers-in-resume.patch b/queue-6.6/thunderbolt-reset-only-non-usb4-host-routers-in-resume.patch
new file mode 100644 (file)
index 0000000..6c48a2f
--- /dev/null
@@ -0,0 +1,40 @@
+From 8cf9926c537ce8b0c7783afebe752e084765d553 Mon Sep 17 00:00:00 2001
+From: Mika Westerberg <mika.westerberg@linux.intel.com>
+Date: Wed, 31 Jan 2024 11:12:59 +0200
+Subject: thunderbolt: Reset only non-USB4 host routers in resume
+
+From: Mika Westerberg <mika.westerberg@linux.intel.com>
+
+commit 8cf9926c537ce8b0c7783afebe752e084765d553 upstream.
+
+There is no need to reset the USB4 host routers on resume because they
+are reset already and this may cause problems if the link does not come
+up soon enough. For this reason limit this to happen in non-USB4 host
+routers only (that's Apple systems with Intel Thunderbolt controllers).
+
+Fixes: 59a54c5f3dbd ("thunderbolt: Reset topology created by the boot firmware")
+Cc: Sanath S <Sanath.S@amd.com>
+Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
+Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/thunderbolt/tb.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/thunderbolt/tb.c
++++ b/drivers/thunderbolt/tb.c
+@@ -2259,8 +2259,12 @@ static int tb_resume_noirq(struct tb *tb
+       tb_dbg(tb, "resuming...\n");
+-      /* remove any pci devices the firmware might have setup */
+-      tb_switch_reset(tb->root_switch);
++      /*
++       * For non-USB4 hosts (Apple systems) remove any PCIe devices
++       * the firmware might have setup.
++       */
++      if (!tb_switch_is_usb4(tb->root_switch))
++              tb_switch_reset(tb->root_switch);
+       tb_switch_resume(tb->root_switch, false);
+       tb_free_invalid_tunnels(tb);