]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Jan 2023 15:10:39 +0000 (16:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Jan 2023 15:10:39 +0000 (16:10 +0100)
added patches:
acpi-video-allow-selecting-nvidia-wmi-ec-or-apple-gmux-backlight-from-the-cmdline.patch
arm64-mm-add-pud_user_exec-check-in-pud_user_accessible_page.patch
arm64-mm-fix-incorrect-file_map_count-for-invalid-pmd.patch
arm64-ptrace-use-arm64_sme-to-guard-the-sme-register-enumerations.patch
arm64-signal-always-accept-sve-signal-frames-on-sme-only-systems.patch
arm64-signal-always-allocate-sve-signal-frames-on-sme-only-systems.patch
asoc-rt9120-make-dev-pm-runtime-bind-asoc-component-pm.patch
cifs-do-not-query-ifaces-on-smb1-mounts.patch
cifs-fix-double-free-on-failed-kerberos-auth.patch
cifs-fix-file-info-setting-in-cifs_open_file.patch
cifs-fix-file-info-setting-in-cifs_query_path_info.patch
cifs-fix-uninitialized-memory-read-for-smb311-posix-symlink-create.patch
drm-msm-adreno-make-adreno-quirks-not-overwrite-each-other.patch
drm-msm-another-fix-for-the-headless-adreno-gpu.patch
drm-msm-dp-do-not-complete-dp_aux_cmd_fifo_tx-if-irq-is-not-for-aux-transfer.patch
dt-bindings-msm-dsi-controller-main-fix-description-of-core-clock.patch
dt-bindings-msm-dsi-controller-main-fix-operating-points-v2-constraint.patch
dt-bindings-msm-dsi-controller-main-fix-power-domain-constraint.patch
dt-bindings-msm-dsi-don-t-require-vcca-supply-on-14nm-phy.patch
dt-bindings-msm-dsi-don-t-require-vdds-supply-on-10nm-phy.patch
dt-bindings-msm-dsi-phy-28nm-add-missing-qcom-dsi-phy-regulator-ldo-mode.patch
firmware-psci-don-t-register-with-debugfs-if-psci-isn-t-available.patch
firmware-psci-fix-mem_protect_range-function-numbers.patch
iavf-iavf_main-actually-log-src-mask-when-talking-about-it.patch
io_uring-fdinfo-include-locked-hash-table-in-fdinfo-output.patch
ipv6-raw-deduct-extension-header-length-in-rawv6_push_pending_frames.patch
ixgbe-fix-pci-device-refcount-leak.patch
platform-surface-aggregator-ignore-command-messages-not-intended-for-us.patch
platform-x86-asus-wmi-don-t-load-fan-curves-without-fan.patch
platform-x86-dell-privacy-fix-sw_camera_lens_cover-reporting.patch
platform-x86-dell-privacy-only-register-sw_camera_lens_cover-if-present.patch
platform-x86-ideapad-laptop-add-legion-5-15arh05-dmi-id-to-set_fn_lock_led_list.patch
platform-x86-int3472-discrete-ensure-the-clk-power-enable-pins-are-in-output-mode.patch
platform-x86-sony-laptop-don-t-turn-off-0x153-keyboard-backlight-during-probe.patch
platform-x86-thinkpad_acpi-fix-profile-mode-display-in-amt-mode.patch

36 files changed:
queue-6.1/acpi-video-allow-selecting-nvidia-wmi-ec-or-apple-gmux-backlight-from-the-cmdline.patch [new file with mode: 0644]
queue-6.1/arm64-mm-add-pud_user_exec-check-in-pud_user_accessible_page.patch [new file with mode: 0644]
queue-6.1/arm64-mm-fix-incorrect-file_map_count-for-invalid-pmd.patch [new file with mode: 0644]
queue-6.1/arm64-ptrace-use-arm64_sme-to-guard-the-sme-register-enumerations.patch [new file with mode: 0644]
queue-6.1/arm64-signal-always-accept-sve-signal-frames-on-sme-only-systems.patch [new file with mode: 0644]
queue-6.1/arm64-signal-always-allocate-sve-signal-frames-on-sme-only-systems.patch [new file with mode: 0644]
queue-6.1/asoc-rt9120-make-dev-pm-runtime-bind-asoc-component-pm.patch [new file with mode: 0644]
queue-6.1/cifs-do-not-query-ifaces-on-smb1-mounts.patch [new file with mode: 0644]
queue-6.1/cifs-fix-double-free-on-failed-kerberos-auth.patch [new file with mode: 0644]
queue-6.1/cifs-fix-file-info-setting-in-cifs_open_file.patch [new file with mode: 0644]
queue-6.1/cifs-fix-file-info-setting-in-cifs_query_path_info.patch [new file with mode: 0644]
queue-6.1/cifs-fix-uninitialized-memory-read-for-smb311-posix-symlink-create.patch [new file with mode: 0644]
queue-6.1/drm-msm-adreno-make-adreno-quirks-not-overwrite-each-other.patch [new file with mode: 0644]
queue-6.1/drm-msm-another-fix-for-the-headless-adreno-gpu.patch [new file with mode: 0644]
queue-6.1/drm-msm-dp-do-not-complete-dp_aux_cmd_fifo_tx-if-irq-is-not-for-aux-transfer.patch [new file with mode: 0644]
queue-6.1/dt-bindings-msm-dsi-controller-main-fix-description-of-core-clock.patch [new file with mode: 0644]
queue-6.1/dt-bindings-msm-dsi-controller-main-fix-operating-points-v2-constraint.patch [new file with mode: 0644]
queue-6.1/dt-bindings-msm-dsi-controller-main-fix-power-domain-constraint.patch [new file with mode: 0644]
queue-6.1/dt-bindings-msm-dsi-don-t-require-vcca-supply-on-14nm-phy.patch [new file with mode: 0644]
queue-6.1/dt-bindings-msm-dsi-don-t-require-vdds-supply-on-10nm-phy.patch [new file with mode: 0644]
queue-6.1/dt-bindings-msm-dsi-phy-28nm-add-missing-qcom-dsi-phy-regulator-ldo-mode.patch [new file with mode: 0644]
queue-6.1/firmware-psci-don-t-register-with-debugfs-if-psci-isn-t-available.patch [new file with mode: 0644]
queue-6.1/firmware-psci-fix-mem_protect_range-function-numbers.patch [new file with mode: 0644]
queue-6.1/iavf-iavf_main-actually-log-src-mask-when-talking-about-it.patch [new file with mode: 0644]
queue-6.1/io_uring-fdinfo-include-locked-hash-table-in-fdinfo-output.patch [new file with mode: 0644]
queue-6.1/ipv6-raw-deduct-extension-header-length-in-rawv6_push_pending_frames.patch [new file with mode: 0644]
queue-6.1/ixgbe-fix-pci-device-refcount-leak.patch [new file with mode: 0644]
queue-6.1/platform-surface-aggregator-ignore-command-messages-not-intended-for-us.patch [new file with mode: 0644]
queue-6.1/platform-x86-asus-wmi-don-t-load-fan-curves-without-fan.patch [new file with mode: 0644]
queue-6.1/platform-x86-dell-privacy-fix-sw_camera_lens_cover-reporting.patch [new file with mode: 0644]
queue-6.1/platform-x86-dell-privacy-only-register-sw_camera_lens_cover-if-present.patch [new file with mode: 0644]
queue-6.1/platform-x86-ideapad-laptop-add-legion-5-15arh05-dmi-id-to-set_fn_lock_led_list.patch [new file with mode: 0644]
queue-6.1/platform-x86-int3472-discrete-ensure-the-clk-power-enable-pins-are-in-output-mode.patch [new file with mode: 0644]
queue-6.1/platform-x86-sony-laptop-don-t-turn-off-0x153-keyboard-backlight-during-probe.patch [new file with mode: 0644]
queue-6.1/platform-x86-thinkpad_acpi-fix-profile-mode-display-in-amt-mode.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/acpi-video-allow-selecting-nvidia-wmi-ec-or-apple-gmux-backlight-from-the-cmdline.patch b/queue-6.1/acpi-video-allow-selecting-nvidia-wmi-ec-or-apple-gmux-backlight-from-the-cmdline.patch
new file mode 100644 (file)
index 0000000..b18169e
--- /dev/null
@@ -0,0 +1,43 @@
+From 420a1116aef0e8e12c305508f45ce73e5ae30a09 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Mon, 9 Jan 2023 20:18:11 +0100
+Subject: ACPI: video: Allow selecting NVidia-WMI-EC or Apple GMUX backlight from the cmdline
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit 420a1116aef0e8e12c305508f45ce73e5ae30a09 upstream.
+
+The patches adding NVidia-WMI-EC and Apple GMUX backlight detection
+support to acpi_video_get_backlight_type(), forgot to update
+acpi_video_parse_cmdline() to allow manually selecting these from
+the commandline.
+
+Add support for these to acpi_video_parse_cmdline().
+
+Fixes: fe7aebb40d42 ("ACPI: video: Add Nvidia WMI EC brightness control detection (v3)")
+Fixes: 21245df307cb ("ACPI: video: Add Apple GMUX brightness control detection")
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/acpi/video_detect.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
+index 1b78c7434492..8a541efc5675 100644
+--- a/drivers/acpi/video_detect.c
++++ b/drivers/acpi/video_detect.c
+@@ -50,6 +50,10 @@ static void acpi_video_parse_cmdline(void)
+               acpi_backlight_cmdline = acpi_backlight_video;
+       if (!strcmp("native", acpi_video_backlight_string))
+               acpi_backlight_cmdline = acpi_backlight_native;
++      if (!strcmp("nvidia_wmi_ec", acpi_video_backlight_string))
++              acpi_backlight_cmdline = acpi_backlight_nvidia_wmi_ec;
++      if (!strcmp("apple_gmux", acpi_video_backlight_string))
++              acpi_backlight_cmdline = acpi_backlight_apple_gmux;
+       if (!strcmp("none", acpi_video_backlight_string))
+               acpi_backlight_cmdline = acpi_backlight_none;
+ }
+-- 
+2.39.0
+
diff --git a/queue-6.1/arm64-mm-add-pud_user_exec-check-in-pud_user_accessible_page.patch b/queue-6.1/arm64-mm-add-pud_user_exec-check-in-pud_user_accessible_page.patch
new file mode 100644 (file)
index 0000000..b4879a0
--- /dev/null
@@ -0,0 +1,42 @@
+From 730a11f982e61aaef758ab552dfb7c30de79e99b Mon Sep 17 00:00:00 2001
+From: Liu Shixin <liushixin2@huawei.com>
+Date: Tue, 22 Nov 2022 20:31:37 +0800
+Subject: arm64/mm: add pud_user_exec() check in pud_user_accessible_page()
+
+From: Liu Shixin <liushixin2@huawei.com>
+
+commit 730a11f982e61aaef758ab552dfb7c30de79e99b upstream.
+
+Add check for the executable case in pud_user_accessible_page() too
+like what we did for pte and pmd.
+
+Fixes: 42b2547137f5 ("arm64/mm: enable ARCH_SUPPORTS_PAGE_TABLE_CHECK")
+Suggested-by: Will Deacon <will@kernel.org>
+Signed-off-by: Liu Shixin <liushixin2@huawei.com>
+Link: https://lore.kernel.org/r/20221122123137.429686-1-liushixin2@huawei.com
+Signed-off-by: Will Deacon <will@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/include/asm/pgtable.h |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm64/include/asm/pgtable.h
++++ b/arch/arm64/include/asm/pgtable.h
+@@ -682,7 +682,7 @@ static inline unsigned long pmd_page_vad
+ #define pud_leaf(pud)         (pud_present(pud) && !pud_table(pud))
+ #define pud_valid(pud)                pte_valid(pud_pte(pud))
+ #define pud_user(pud)         pte_user(pud_pte(pud))
+-
++#define pud_user_exec(pud)    pte_user_exec(pud_pte(pud))
+ static inline void set_pud(pud_t *pudp, pud_t pud)
+ {
+@@ -868,7 +868,7 @@ static inline bool pmd_user_accessible_p
+ static inline bool pud_user_accessible_page(pud_t pud)
+ {
+-      return pud_leaf(pud) && pud_user(pud);
++      return pud_leaf(pud) && (pud_user(pud) || pud_user_exec(pud));
+ }
+ #endif
diff --git a/queue-6.1/arm64-mm-fix-incorrect-file_map_count-for-invalid-pmd.patch b/queue-6.1/arm64-mm-fix-incorrect-file_map_count-for-invalid-pmd.patch
new file mode 100644 (file)
index 0000000..48cde1d
--- /dev/null
@@ -0,0 +1,74 @@
+From 74c2f81054510d45b813548cb0a1c4ebf87cdd5f Mon Sep 17 00:00:00 2001
+From: Liu Shixin <liushixin2@huawei.com>
+Date: Mon, 21 Nov 2022 15:36:08 +0800
+Subject: arm64/mm: fix incorrect file_map_count for invalid pmd
+
+From: Liu Shixin <liushixin2@huawei.com>
+
+commit 74c2f81054510d45b813548cb0a1c4ebf87cdd5f upstream.
+
+The page table check trigger BUG_ON() unexpectedly when split hugepage:
+
+ ------------[ cut here ]------------
+ kernel BUG at mm/page_table_check.c:119!
+ Internal error: Oops - BUG: 00000000f2000800 [#1] SMP
+ Dumping ftrace buffer:
+    (ftrace buffer empty)
+ Modules linked in:
+ CPU: 7 PID: 210 Comm: transhuge-stres Not tainted 6.1.0-rc3+ #748
+ Hardware name: linux,dummy-virt (DT)
+ pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
+ pc : page_table_check_set.isra.0+0x398/0x468
+ lr : page_table_check_set.isra.0+0x1c0/0x468
+[...]
+ Call trace:
+  page_table_check_set.isra.0+0x398/0x468
+  __page_table_check_pte_set+0x160/0x1c0
+  __split_huge_pmd_locked+0x900/0x1648
+  __split_huge_pmd+0x28c/0x3b8
+  unmap_page_range+0x428/0x858
+  unmap_single_vma+0xf4/0x1c8
+  zap_page_range+0x2b0/0x410
+  madvise_vma_behavior+0xc44/0xe78
+  do_madvise+0x280/0x698
+  __arm64_sys_madvise+0x90/0xe8
+  invoke_syscall.constprop.0+0xdc/0x1d8
+  do_el0_svc+0xf4/0x3f8
+  el0_svc+0x58/0x120
+  el0t_64_sync_handler+0xb8/0xc0
+  el0t_64_sync+0x19c/0x1a0
+[...]
+
+On arm64, pmd_leaf() will return true even if the pmd is invalid due to
+pmd_present_invalid() check. So in pmdp_invalidate() the file_map_count
+will not only decrease once but also increase once. Then in set_pte_at(),
+the file_map_count increase again, and so trigger BUG_ON() unexpectedly.
+
+Add !pmd_present_invalid() check in pmd_user_accessible_page() to fix the
+problem.
+
+Fixes: 42b2547137f5 ("arm64/mm: enable ARCH_SUPPORTS_PAGE_TABLE_CHECK")
+Reported-by: Denys Vlasenko <dvlasenk@redhat.com>
+Signed-off-by: Liu Shixin <liushixin2@huawei.com>
+Acked-by: Pasha Tatashin <pasha.tatashin@soleen.com>
+Acked-by: David Hildenbrand <david@redhat.com>
+Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com>
+Acked-by: Will Deacon <will@kernel.org>
+Link: https://lore.kernel.org/r/20221121073608.4183459-1-liushixin2@huawei.com
+Signed-off-by: Will Deacon <will@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/include/asm/pgtable.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm64/include/asm/pgtable.h
++++ b/arch/arm64/include/asm/pgtable.h
+@@ -863,7 +863,7 @@ static inline bool pte_user_accessible_p
+ static inline bool pmd_user_accessible_page(pmd_t pmd)
+ {
+-      return pmd_leaf(pmd) && (pmd_user(pmd) || pmd_user_exec(pmd));
++      return pmd_leaf(pmd) && !pmd_present_invalid(pmd) && (pmd_user(pmd) || pmd_user_exec(pmd));
+ }
+ static inline bool pud_user_accessible_page(pud_t pud)
diff --git a/queue-6.1/arm64-ptrace-use-arm64_sme-to-guard-the-sme-register-enumerations.patch b/queue-6.1/arm64-ptrace-use-arm64_sme-to-guard-the-sme-register-enumerations.patch
new file mode 100644 (file)
index 0000000..9bd3d7a
--- /dev/null
@@ -0,0 +1,37 @@
+From eb9a85261e297292c4cc44b628c1373c996cedc2 Mon Sep 17 00:00:00 2001
+From: Zenghui Yu <yuzenghui@huawei.com>
+Date: Wed, 14 Dec 2022 21:59:43 +0800
+Subject: arm64: ptrace: Use ARM64_SME to guard the SME register enumerations
+
+From: Zenghui Yu <yuzenghui@huawei.com>
+
+commit eb9a85261e297292c4cc44b628c1373c996cedc2 upstream.
+
+We currently guard REGSET_{SSVE, ZA} using ARM64_SVE for no good reason.
+Both enumerations would be pointless without ARM64_SME and create two empty
+entries in aarch64_regsets[] which would then become part of a process's
+native regset view (they should be ignored though).
+
+Switch to use ARM64_SME instead.
+
+Fixes: e12310a0d30f ("arm64/sme: Implement ptrace support for streaming mode SVE registers")
+Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
+Reviewed-by: Mark Brown <broonie@kernel.org>
+Link: https://lore.kernel.org/r/20221214135943.379-1-yuzenghui@huawei.com
+Signed-off-by: Will Deacon <will@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/kernel/ptrace.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm64/kernel/ptrace.c
++++ b/arch/arm64/kernel/ptrace.c
+@@ -1364,7 +1364,7 @@ enum aarch64_regset {
+ #ifdef CONFIG_ARM64_SVE
+       REGSET_SVE,
+ #endif
+-#ifdef CONFIG_ARM64_SVE
++#ifdef CONFIG_ARM64_SME
+       REGSET_SSVE,
+       REGSET_ZA,
+ #endif
diff --git a/queue-6.1/arm64-signal-always-accept-sve-signal-frames-on-sme-only-systems.patch b/queue-6.1/arm64-signal-always-accept-sve-signal-frames-on-sme-only-systems.patch
new file mode 100644 (file)
index 0000000..4d047d7
--- /dev/null
@@ -0,0 +1,41 @@
+From 7dde62f0687c8856b6c0660066c7ee83a6a6f033 Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@kernel.org>
+Date: Tue, 27 Dec 2022 17:12:05 +0000
+Subject: arm64/signal: Always accept SVE signal frames on SME only systems
+
+From: Mark Brown <broonie@kernel.org>
+
+commit 7dde62f0687c8856b6c0660066c7ee83a6a6f033 upstream.
+
+Currently we reject an attempt to restore a SVE signal frame on a system
+with SME but not SVE supported. This means that it is not possible to
+disable streaming mode via signal return as this is configured via the
+flags in the SVE signal context. Instead accept the signal frame, we will
+require it to have a vector length of 0 specified and no payload since the
+task will have no SVE vector length configured.
+
+Fixes: 85ed24dad290 ("arm64/sme: Implement streaming SVE signal handling")
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Link: https://lore.kernel.org/r/20221223-arm64-fix-sme-only-v1-2-938d663f69e5@kernel.org
+Signed-off-by: Will Deacon <will@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/kernel/signal.c |    7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/arch/arm64/kernel/signal.c
++++ b/arch/arm64/kernel/signal.c
+@@ -280,7 +280,12 @@ static int restore_sve_fpsimd_context(st
+               vl = task_get_sme_vl(current);
+       } else {
+-              if (!system_supports_sve())
++              /*
++               * A SME only system use SVE for streaming mode so can
++               * have a SVE formatted context with a zero VL and no
++               * payload data.
++               */
++              if (!system_supports_sve() && !system_supports_sme())
+                       return -EINVAL;
+               vl = task_get_sve_vl(current);
diff --git a/queue-6.1/arm64-signal-always-allocate-sve-signal-frames-on-sme-only-systems.patch b/queue-6.1/arm64-signal-always-allocate-sve-signal-frames-on-sme-only-systems.patch
new file mode 100644 (file)
index 0000000..0eee2dd
--- /dev/null
@@ -0,0 +1,34 @@
+From f26cd7372160da2eba31061d7943348ab9f2c01d Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@kernel.org>
+Date: Tue, 27 Dec 2022 17:12:06 +0000
+Subject: arm64/signal: Always allocate SVE signal frames on SME only systems
+
+From: Mark Brown <broonie@kernel.org>
+
+commit f26cd7372160da2eba31061d7943348ab9f2c01d upstream.
+
+Currently we only allocate space for SVE signal frames on systems that
+support SVE, meaning that SME only systems do not allocate a signal frame
+for streaming mode SVE state. Change the check so space is allocated if
+either feature is supported.
+
+Fixes: 85ed24dad290 ("arm64/sme: Implement streaming SVE signal handling")
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Link: https://lore.kernel.org/r/20221223-arm64-fix-sme-only-v1-3-938d663f69e5@kernel.org
+Signed-off-by: Will Deacon <will@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/kernel/signal.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm64/kernel/signal.c
++++ b/arch/arm64/kernel/signal.c
+@@ -729,7 +729,7 @@ static int setup_sigframe_layout(struct
+                       return err;
+       }
+-      if (system_supports_sve()) {
++      if (system_supports_sve() || system_supports_sme()) {
+               unsigned int vq = 0;
+               if (add_all || test_thread_flag(TIF_SVE) ||
diff --git a/queue-6.1/asoc-rt9120-make-dev-pm-runtime-bind-asoc-component-pm.patch b/queue-6.1/asoc-rt9120-make-dev-pm-runtime-bind-asoc-component-pm.patch
new file mode 100644 (file)
index 0000000..965459c
--- /dev/null
@@ -0,0 +1,56 @@
+From 7161bd540eebebae2bbe8c79de25d8caf12dbf78 Mon Sep 17 00:00:00 2001
+From: ChiYuan Huang <cy_huang@richtek.com>
+Date: Thu, 29 Dec 2022 16:03:53 +0800
+Subject: ASoC: rt9120: Make dev PM runtime bind AsoC component PM
+
+From: ChiYuan Huang <cy_huang@richtek.com>
+
+commit 7161bd540eebebae2bbe8c79de25d8caf12dbf78 upstream.
+
+RT9120 uses PM runtime autosuspend to decrease the frequently on/off
+spent time. This exists one case, when pcm is closed and dev PM is
+waiting for autosuspend time expired to enter runtime suspend state.
+At the mean time, system is going to enter suspend, dev PM runtime
+suspend won't be called. It makes the rt9120 suspend consumption
+current not as expected.
+
+This patch can fix the rt9120 dev PM issue during runtime autosuspend
+and system suspend by binding dev PM runtime and ASoC component PM.
+
+Fixes: 80b949f332e3 ("ASoC: rt9120: Use pm_runtime and regcache to optimize 'pwdnn' logic")
+Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
+Link: https://lore.kernel.org/r/1672301033-3675-1-git-send-email-u0084500@gmail.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/codecs/rt9120.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/sound/soc/codecs/rt9120.c b/sound/soc/codecs/rt9120.c
+index 644300e88b4c..fcf4fbaed3c7 100644
+--- a/sound/soc/codecs/rt9120.c
++++ b/sound/soc/codecs/rt9120.c
+@@ -177,8 +177,20 @@ static int rt9120_codec_probe(struct snd_soc_component *comp)
+       return 0;
+ }
++static int rt9120_codec_suspend(struct snd_soc_component *comp)
++{
++      return pm_runtime_force_suspend(comp->dev);
++}
++
++static int rt9120_codec_resume(struct snd_soc_component *comp)
++{
++      return pm_runtime_force_resume(comp->dev);
++}
++
+ static const struct snd_soc_component_driver rt9120_component_driver = {
+       .probe = rt9120_codec_probe,
++      .suspend = rt9120_codec_suspend,
++      .resume = rt9120_codec_resume,
+       .controls = rt9120_snd_controls,
+       .num_controls = ARRAY_SIZE(rt9120_snd_controls),
+       .dapm_widgets = rt9120_dapm_widgets,
+-- 
+2.39.0
+
diff --git a/queue-6.1/cifs-do-not-query-ifaces-on-smb1-mounts.patch b/queue-6.1/cifs-do-not-query-ifaces-on-smb1-mounts.patch
new file mode 100644 (file)
index 0000000..157f23c
--- /dev/null
@@ -0,0 +1,47 @@
+From 22aeb01db7080e18c6aeb4361cc2556c9887099a Mon Sep 17 00:00:00 2001
+From: Paulo Alcantara <pc@cjr.nz>
+Date: Tue, 10 Jan 2023 19:23:21 -0300
+Subject: cifs: do not query ifaces on smb1 mounts
+
+From: Paulo Alcantara <pc@cjr.nz>
+
+commit 22aeb01db7080e18c6aeb4361cc2556c9887099a upstream.
+
+Users have reported the following error on every 600 seconds
+(SMB_INTERFACE_POLL_INTERVAL) when mounting SMB1 shares:
+
+       CIFS: VFS: \\srv\share error -5 on ioctl to get interface list
+
+It's supported only by SMB2+, so do not query network interfaces on
+SMB1 mounts.
+
+Fixes: 6e1c1c08cdf3 ("cifs: periodically query network interfaces from server")
+Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
+Reviewed-by: Tom Talpey <tom@talpey.com>
+Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
+Signed-off-by: Steve French <stfrench@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/cifs/connect.c |    9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/fs/cifs/connect.c
++++ b/fs/cifs/connect.c
+@@ -2609,11 +2609,14 @@ cifs_get_tcon(struct cifs_ses *ses, stru
+       INIT_LIST_HEAD(&tcon->pending_opens);
+       tcon->status = TID_GOOD;
+-      /* schedule query interfaces poll */
+       INIT_DELAYED_WORK(&tcon->query_interfaces,
+                         smb2_query_server_interfaces);
+-      queue_delayed_work(cifsiod_wq, &tcon->query_interfaces,
+-                         (SMB_INTERFACE_POLL_INTERVAL * HZ));
++      if (ses->server->dialect >= SMB30_PROT_ID &&
++          (ses->server->capabilities & SMB2_GLOBAL_CAP_MULTI_CHANNEL)) {
++              /* schedule query interfaces poll */
++              queue_delayed_work(cifsiod_wq, &tcon->query_interfaces,
++                                 (SMB_INTERFACE_POLL_INTERVAL * HZ));
++      }
+       spin_lock(&cifs_tcp_ses_lock);
+       list_add(&tcon->tcon_list, &ses->tcon_list);
diff --git a/queue-6.1/cifs-fix-double-free-on-failed-kerberos-auth.patch b/queue-6.1/cifs-fix-double-free-on-failed-kerberos-auth.patch
new file mode 100644 (file)
index 0000000..01c2577
--- /dev/null
@@ -0,0 +1,40 @@
+From 39e8db3c860e2678ce5a7d74193925876507c9eb Mon Sep 17 00:00:00 2001
+From: Paulo Alcantara <pc@cjr.nz>
+Date: Tue, 10 Jan 2023 17:55:20 -0300
+Subject: cifs: fix double free on failed kerberos auth
+
+From: Paulo Alcantara <pc@cjr.nz>
+
+commit 39e8db3c860e2678ce5a7d74193925876507c9eb upstream.
+
+If session setup failed with kerberos auth, we ended up freeing
+cifs_ses::auth_key.response twice in SMB2_auth_kerberos() and
+sesInfoFree().
+
+Fix this by zeroing out cifs_ses::auth_key.response after freeing it
+in SMB2_auth_kerberos().
+
+Fixes: a4e430c8c8ba ("cifs: replace kfree() with kfree_sensitive() for sensitive data")
+Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
+Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
+Signed-off-by: Steve French <stfrench@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/cifs/smb2pdu.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/fs/cifs/smb2pdu.c
++++ b/fs/cifs/smb2pdu.c
+@@ -1479,8 +1479,11 @@ SMB2_auth_kerberos(struct SMB2_sess_data
+ out_put_spnego_key:
+       key_invalidate(spnego_key);
+       key_put(spnego_key);
+-      if (rc)
++      if (rc) {
+               kfree_sensitive(ses->auth_key.response);
++              ses->auth_key.response = NULL;
++              ses->auth_key.len = 0;
++      }
+ out:
+       sess_data->result = rc;
+       sess_data->func = NULL;
diff --git a/queue-6.1/cifs-fix-file-info-setting-in-cifs_open_file.patch b/queue-6.1/cifs-fix-file-info-setting-in-cifs_open_file.patch
new file mode 100644 (file)
index 0000000..eb16d1e
--- /dev/null
@@ -0,0 +1,153 @@
+From ba5d4c1596cada37793d405dd18d695cd3508902 Mon Sep 17 00:00:00 2001
+From: Paulo Alcantara <pc@cjr.nz>
+Date: Fri, 6 Jan 2023 13:34:36 -0300
+Subject: cifs: fix file info setting in cifs_open_file()
+
+From: Paulo Alcantara <pc@cjr.nz>
+
+commit ba5d4c1596cada37793d405dd18d695cd3508902 upstream.
+
+In cifs_open_file(), @buf must hold a pointer to a cifs_open_info_data
+structure which is passed by cifs_nt_open(), so assigning @buf
+directly to @fi was obviously wrong.
+
+Fix this by passing a valid FILE_ALL_INFO structure to SMBLegacyOpen()
+and CIFS_open(), and then copy the set structure to the corresponding
+cifs_open_info_data::fi field with move_cifs_info_to_smb2() helper.
+
+Link: https://bugzilla.kernel.org/show_bug.cgi?id=216889
+Fixes: 76894f3e2f71 ("cifs: improve symlink handling for smb2+")
+Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
+Signed-off-by: Steve French <stfrench@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/cifs/smb1ops.c | 54 ++++++++++++++++++++++++-----------------------
+ 1 file changed, 28 insertions(+), 26 deletions(-)
+
+diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c
+index 5fe2c2f8ef41..4cb364454e13 100644
+--- a/fs/cifs/smb1ops.c
++++ b/fs/cifs/smb1ops.c
+@@ -719,17 +719,25 @@ cifs_mkdir_setinfo(struct inode *inode, const char *full_path,
+ static int cifs_open_file(const unsigned int xid, struct cifs_open_parms *oparms, __u32 *oplock,
+                         void *buf)
+ {
+-      FILE_ALL_INFO *fi = buf;
++      struct cifs_open_info_data *data = buf;
++      FILE_ALL_INFO fi = {};
++      int rc;
+       if (!(oparms->tcon->ses->capabilities & CAP_NT_SMBS))
+-              return SMBLegacyOpen(xid, oparms->tcon, oparms->path,
+-                                   oparms->disposition,
+-                                   oparms->desired_access,
+-                                   oparms->create_options,
+-                                   &oparms->fid->netfid, oplock, fi,
+-                                   oparms->cifs_sb->local_nls,
+-                                   cifs_remap(oparms->cifs_sb));
+-      return CIFS_open(xid, oparms, oplock, fi);
++              rc = SMBLegacyOpen(xid, oparms->tcon, oparms->path,
++                                 oparms->disposition,
++                                 oparms->desired_access,
++                                 oparms->create_options,
++                                 &oparms->fid->netfid, oplock, &fi,
++                                 oparms->cifs_sb->local_nls,
++                                 cifs_remap(oparms->cifs_sb));
++      else
++              rc = CIFS_open(xid, oparms, oplock, &fi);
++
++      if (!rc && data)
++              move_cifs_info_to_smb2(&data->fi, &fi);
++
++      return rc;
+ }
+ static void
+@@ -1053,7 +1061,7 @@ cifs_make_node(unsigned int xid, struct inode *inode,
+       struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
+       struct inode *newinode = NULL;
+       int rc = -EPERM;
+-      FILE_ALL_INFO *buf = NULL;
++      struct cifs_open_info_data buf = {};
+       struct cifs_io_parms io_parms;
+       __u32 oplock = 0;
+       struct cifs_fid fid;
+@@ -1085,14 +1093,14 @@ cifs_make_node(unsigned int xid, struct inode *inode,
+                                           cifs_sb->local_nls,
+                                           cifs_remap(cifs_sb));
+               if (rc)
+-                      goto out;
++                      return rc;
+               rc = cifs_get_inode_info_unix(&newinode, full_path,
+                                             inode->i_sb, xid);
+               if (rc == 0)
+                       d_instantiate(dentry, newinode);
+-              goto out;
++              return rc;
+       }
+       /*
+@@ -1100,19 +1108,13 @@ cifs_make_node(unsigned int xid, struct inode *inode,
+        * support block and char device (no socket & fifo)
+        */
+       if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL))
+-              goto out;
++              return rc;
+       if (!S_ISCHR(mode) && !S_ISBLK(mode))
+-              goto out;
++              return rc;
+       cifs_dbg(FYI, "sfu compat create special file\n");
+-      buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL);
+-      if (buf == NULL) {
+-              rc = -ENOMEM;
+-              goto out;
+-      }
+-
+       oparms.tcon = tcon;
+       oparms.cifs_sb = cifs_sb;
+       oparms.desired_access = GENERIC_WRITE;
+@@ -1127,21 +1129,21 @@ cifs_make_node(unsigned int xid, struct inode *inode,
+               oplock = REQ_OPLOCK;
+       else
+               oplock = 0;
+-      rc = tcon->ses->server->ops->open(xid, &oparms, &oplock, buf);
++      rc = tcon->ses->server->ops->open(xid, &oparms, &oplock, &buf);
+       if (rc)
+-              goto out;
++              return rc;
+       /*
+        * BB Do not bother to decode buf since no local inode yet to put
+        * timestamps in, but we can reuse it safely.
+        */
+-      pdev = (struct win_dev *)buf;
++      pdev = (struct win_dev *)&buf.fi;
+       io_parms.pid = current->tgid;
+       io_parms.tcon = tcon;
+       io_parms.offset = 0;
+       io_parms.length = sizeof(struct win_dev);
+-      iov[1].iov_base = buf;
++      iov[1].iov_base = &buf.fi;
+       iov[1].iov_len = sizeof(struct win_dev);
+       if (S_ISCHR(mode)) {
+               memcpy(pdev->type, "IntxCHR", 8);
+@@ -1160,8 +1162,8 @@ cifs_make_node(unsigned int xid, struct inode *inode,
+       d_drop(dentry);
+       /* FIXME: add code here to set EAs */
+-out:
+-      kfree(buf);
++
++      cifs_free_open_info(&buf);
+       return rc;
+ }
+-- 
+2.39.0
+
diff --git a/queue-6.1/cifs-fix-file-info-setting-in-cifs_query_path_info.patch b/queue-6.1/cifs-fix-file-info-setting-in-cifs_query_path_info.patch
new file mode 100644 (file)
index 0000000..423fc47
--- /dev/null
@@ -0,0 +1,55 @@
+From 29cf28235e3e57e0af01ae29db57a75f87a2ada8 Mon Sep 17 00:00:00 2001
+From: Paulo Alcantara <pc@cjr.nz>
+Date: Fri, 6 Jan 2023 20:28:30 -0300
+Subject: cifs: fix file info setting in cifs_query_path_info()
+
+From: Paulo Alcantara <pc@cjr.nz>
+
+commit 29cf28235e3e57e0af01ae29db57a75f87a2ada8 upstream.
+
+We missed to set file info when CIFSSMBQPathInfo() returned 0, thus
+leaving cifs_open_info_data::fi unset.
+
+Fix this by setting cifs_open_info_data::fi when either
+CIFSSMBQPathInfo() or SMBQueryInformation() succeed.
+
+Link: https://bugzilla.kernel.org/show_bug.cgi?id=216881
+Fixes: 76894f3e2f71 ("cifs: improve symlink handling for smb2+")
+Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
+Signed-off-by: Steve French <stfrench@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/cifs/smb1ops.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c
+index 50480751e521..5fe2c2f8ef41 100644
+--- a/fs/cifs/smb1ops.c
++++ b/fs/cifs/smb1ops.c
+@@ -562,17 +562,20 @@ static int cifs_query_path_info(const unsigned int xid, struct cifs_tcon *tcon,
+       if ((rc == -EOPNOTSUPP) || (rc == -EINVAL)) {
+               rc = SMBQueryInformation(xid, tcon, full_path, &fi, cifs_sb->local_nls,
+                                        cifs_remap(cifs_sb));
+-              if (!rc)
+-                      move_cifs_info_to_smb2(&data->fi, &fi);
+               *adjustTZ = true;
+       }
+-      if (!rc && (le32_to_cpu(fi.Attributes) & ATTR_REPARSE)) {
++      if (!rc) {
+               int tmprc;
+               int oplock = 0;
+               struct cifs_fid fid;
+               struct cifs_open_parms oparms;
++              move_cifs_info_to_smb2(&data->fi, &fi);
++
++              if (!(le32_to_cpu(fi.Attributes) & ATTR_REPARSE))
++                      return 0;
++
+               oparms.tcon = tcon;
+               oparms.cifs_sb = cifs_sb;
+               oparms.desired_access = FILE_READ_ATTRIBUTES;
+-- 
+2.39.0
+
diff --git a/queue-6.1/cifs-fix-uninitialized-memory-read-for-smb311-posix-symlink-create.patch b/queue-6.1/cifs-fix-uninitialized-memory-read-for-smb311-posix-symlink-create.patch
new file mode 100644 (file)
index 0000000..53bf8c6
--- /dev/null
@@ -0,0 +1,34 @@
+From a152d05ae4a71d802d50cf9177dba34e8bb09f68 Mon Sep 17 00:00:00 2001
+From: Volker Lendecke <vl@samba.org>
+Date: Wed, 11 Jan 2023 12:37:58 +0100
+Subject: cifs: Fix uninitialized memory read for smb311 posix symlink create
+
+From: Volker Lendecke <vl@samba.org>
+
+commit a152d05ae4a71d802d50cf9177dba34e8bb09f68 upstream.
+
+If smb311 posix is enabled, we send the intended mode for file
+creation in the posix create context. Instead of using what's there on
+the stack, create the mfsymlink file with 0644.
+
+Fixes: ce558b0e17f8a ("smb3: Add posix create context for smb3.11 posix mounts")
+Cc: stable@vger.kernel.org
+Signed-off-by: Volker Lendecke <vl@samba.org>
+Reviewed-by: Tom Talpey <tom@talpey.com>
+Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
+Signed-off-by: Steve French <stfrench@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/cifs/link.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/fs/cifs/link.c
++++ b/fs/cifs/link.c
+@@ -428,6 +428,7 @@ smb3_create_mf_symlink(unsigned int xid,
+       oparms.disposition = FILE_CREATE;
+       oparms.fid = &fid;
+       oparms.reconnect = false;
++      oparms.mode = 0644;
+       rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL,
+                      NULL, NULL);
diff --git a/queue-6.1/drm-msm-adreno-make-adreno-quirks-not-overwrite-each-other.patch b/queue-6.1/drm-msm-adreno-make-adreno-quirks-not-overwrite-each-other.patch
new file mode 100644 (file)
index 0000000..4094005
--- /dev/null
@@ -0,0 +1,56 @@
+From 13ef096e342b00e30b95a90c6c13eee1f0bec4c5 Mon Sep 17 00:00:00 2001
+From: Konrad Dybcio <konrad.dybcio@linaro.org>
+Date: Mon, 2 Jan 2023 11:02:00 +0100
+Subject: drm/msm/adreno: Make adreno quirks not overwrite each other
+
+From: Konrad Dybcio <konrad.dybcio@linaro.org>
+
+commit 13ef096e342b00e30b95a90c6c13eee1f0bec4c5 upstream.
+
+So far the adreno quirks have all been assigned with an OR operator,
+which is problematic, because they were assigned consecutive integer
+values, which makes checking them with an AND operator kind of no bueno..
+
+Switch to using BIT(n) so that only the quirks that the programmer chose
+are taken into account when evaluating info->quirks & ADRENO_QUIRK_...
+
+Fixes: 370063ee427a ("drm/msm/adreno: Add A540 support")
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
+Reviewed-by: Rob Clark <robdclark@gmail.com>
+Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
+Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com>
+Patchwork: https://patchwork.freedesktop.org/patch/516456/
+Link: https://lore.kernel.org/r/20230102100201.77286-1-konrad.dybcio@linaro.org
+Signed-off-by: Rob Clark <robdclark@chromium.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/msm/adreno/adreno_gpu.h |   10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h
++++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
+@@ -29,11 +29,9 @@ enum {
+       ADRENO_FW_MAX,
+ };
+-enum adreno_quirks {
+-      ADRENO_QUIRK_TWO_PASS_USE_WFI = 1,
+-      ADRENO_QUIRK_FAULT_DETECT_MASK = 2,
+-      ADRENO_QUIRK_LMLOADKILL_DISABLE = 3,
+-};
++#define ADRENO_QUIRK_TWO_PASS_USE_WFI         BIT(0)
++#define ADRENO_QUIRK_FAULT_DETECT_MASK                BIT(1)
++#define ADRENO_QUIRK_LMLOADKILL_DISABLE               BIT(2)
+ struct adreno_rev {
+       uint8_t  core;
+@@ -65,7 +63,7 @@ struct adreno_info {
+       const char *name;
+       const char *fw[ADRENO_FW_MAX];
+       uint32_t gmem;
+-      enum adreno_quirks quirks;
++      u64 quirks;
+       struct msm_gpu *(*init)(struct drm_device *dev);
+       const char *zapfw;
+       u32 inactive_period;
diff --git a/queue-6.1/drm-msm-another-fix-for-the-headless-adreno-gpu.patch b/queue-6.1/drm-msm-another-fix-for-the-headless-adreno-gpu.patch
new file mode 100644 (file)
index 0000000..245de76
--- /dev/null
@@ -0,0 +1,104 @@
+From 00dd060ab3cf95ca6ede7853bc14397014971b5e Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Date: Thu, 5 Jan 2023 03:47:43 +0200
+Subject: drm/msm: another fix for the headless Adreno GPU
+
+From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+
+commit 00dd060ab3cf95ca6ede7853bc14397014971b5e upstream.
+
+Fix another oops reproducible when rebooting the board with the Adreno
+GPU working in the headless mode (e.g. iMX platforms).
+
+Unable to handle kernel NULL pointer dereference at virtual address 00000000 when read
+[00000000] *pgd=74936831, *pte=00000000, *ppte=00000000
+Internal error: Oops: 17 [#1] ARM
+CPU: 0 PID: 51 Comm: reboot Not tainted 6.2.0-rc1-dirty #11
+Hardware name: Freescale i.MX53 (Device Tree Support)
+PC is at msm_atomic_commit_tail+0x50/0x970
+LR is at commit_tail+0x9c/0x188
+pc : [<c06aa430>]    lr : [<c067a214>]    psr: 600e0013
+sp : e0851d30  ip : ee4eb7eb  fp : 00090acc
+r10: 00000058  r9 : c2193014  r8 : c4310000
+r7 : c4759380  r6 : 07bef61d  r5 : 00000000  r4 : 00000000
+r3 : c44cc440  r2 : 00000000  r1 : 00000000  r0 : 00000000
+Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
+Control: 10c5387d  Table: 74910019  DAC: 00000051
+Register r0 information: NULL pointer
+Register r1 information: NULL pointer
+Register r2 information: NULL pointer
+Register r3 information: slab kmalloc-1k start c44cc400 pointer offset 64 size 1024
+Register r4 information: NULL pointer
+Register r5 information: NULL pointer
+Register r6 information: non-paged memory
+Register r7 information: slab kmalloc-128 start c4759380 pointer offset 0 size 128
+Register r8 information: slab kmalloc-2k start c4310000 pointer offset 0 size 2048
+Register r9 information: non-slab/vmalloc memory
+Register r10 information: non-paged memory
+Register r11 information: non-paged memory
+Register r12 information: non-paged memory
+Process reboot (pid: 51, stack limit = 0xc80046d9)
+Stack: (0xe0851d30 to 0xe0852000)
+1d20:                                     c4759380 fbd77200 000005ff 002b9c70
+1d40: c4759380 c4759380 00000000 07bef61d 00000600 c0d6fe7c c2193014 00000058
+1d60: 00090acc c067a214 00000000 c4759380 c4310000 00000000 c44cc854 c067a89c
+1d80: 00000000 00000000 00000000 c4310468 00000000 c4759380 c4310000 c4310468
+1da0: c4310470 c0643258 c4759380 00000000 00000000 c0c4ee24 00000000 c44cc810
+1dc0: 00000000 c0c4ee24 00000000 c44cc810 00000000 0347d2a8 e0851e00 e0851e00
+1de0: c4759380 c067ad20 c4310000 00000000 c44cc810 c27f8718 c44cc854 c067adb8
+1e00: c4933000 00000002 00000001 00000000 00000000 c2130850 00000000 c2130854
+1e20: c25fc488 00000000 c0ff162c 00000000 00000001 00000002 00000000 00000000
+1e40: c43102c0 c43102c0 00000000 0347d2a8 c44cc810 c44cc814 c2133da8 c06d1a60
+1e60: 00000000 00000000 00079028 c2012f24 fee1dead c4933000 00000058 c01431e4
+1e80: 01234567 c0143a20 00000000 00000000 00000000 00000000 00000000 00000000
+1ea0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
+1ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
+1ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
+1f00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
+1f20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
+1f40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
+1f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
+1f80: 00000000 00000000 00000000 0347d2a8 00000002 00000004 00000078 00000058
+1fa0: c010028c c0100060 00000002 00000004 fee1dead 28121969 01234567 00079028
+1fc0: 00000002 00000004 00000078 00000058 0002fdc5 00000000 00000000 00090acc
+1fe0: 00000058 becc9c64 b6e97e05 b6e0e5f6 600e0030 fee1dead 00000000 00000000
+ msm_atomic_commit_tail from commit_tail+0x9c/0x188
+ commit_tail from drm_atomic_helper_commit+0x160/0x188
+ drm_atomic_helper_commit from drm_atomic_commit+0xac/0xe0
+ drm_atomic_commit from drm_atomic_helper_disable_all+0x1b0/0x1c0
+ drm_atomic_helper_disable_all from drm_atomic_helper_shutdown+0x88/0x140
+ drm_atomic_helper_shutdown from device_shutdown+0x16c/0x240
+ device_shutdown from kernel_restart+0x38/0x90
+ kernel_restart from __do_sys_reboot+0x174/0x224
+ __do_sys_reboot from ret_fast_syscall+0x0/0x1c
+Exception stack(0xe0851fa8 to 0xe0851ff0)
+1fa0:                   00000002 00000004 fee1dead 28121969 01234567 00079028
+1fc0: 00000002 00000004 00000078 00000058 0002fdc5 00000000 00000000 00090acc
+1fe0: 00000058 becc9c64 b6e97e05 b6e0e5f6
+Code: 15922088 1184421c e1500003 1afffff8 (e5953000)
+---[ end trace 0000000000000000 ]---
+
+Fixes: 0a58d2ae572a ("drm/msm: Make .remove and .shutdown HW shutdown consistent")
+Reported-by: kernel test robot <lkp@intel.com>
+Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Reviewed-by: Rob Clark <robdclark@gmail.com>
+Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
+Patchwork: https://patchwork.freedesktop.org/patch/516909/
+Link: https://lore.kernel.org/r/20230105014743.1478110-1-dmitry.baryshkov@linaro.org
+Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/msm/msm_drv.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/msm/msm_drv.c
++++ b/drivers/gpu/drm/msm/msm_drv.c
+@@ -1271,7 +1271,7 @@ void msm_drv_shutdown(struct platform_de
+        * msm_drm_init, drm_dev->registered is used as an indicator that the
+        * shutdown will be successful.
+        */
+-      if (drm && drm->registered)
++      if (drm && drm->registered && priv->kms)
+               drm_atomic_helper_shutdown(drm);
+ }
diff --git a/queue-6.1/drm-msm-dp-do-not-complete-dp_aux_cmd_fifo_tx-if-irq-is-not-for-aux-transfer.patch b/queue-6.1/drm-msm-dp-do-not-complete-dp_aux_cmd_fifo_tx-if-irq-is-not-for-aux-transfer.patch
new file mode 100644 (file)
index 0000000..9f96948
--- /dev/null
@@ -0,0 +1,77 @@
+From 1cba0d150fa102439114a91b3e215909efc9f169 Mon Sep 17 00:00:00 2001
+From: Kuogee Hsieh <quic_khsieh@quicinc.com>
+Date: Tue, 27 Dec 2022 18:16:24 -0800
+Subject: drm/msm/dp: do not complete dp_aux_cmd_fifo_tx() if irq is not for aux transfer
+
+From: Kuogee Hsieh <quic_khsieh@quicinc.com>
+
+commit 1cba0d150fa102439114a91b3e215909efc9f169 upstream.
+
+There are 3 possible interrupt sources are handled by DP controller,
+HPDstatus, Controller state changes and Aux read/write transaction.
+At every irq, DP controller have to check isr status of every interrupt
+sources and service the interrupt if its isr status bits shows interrupts
+are pending. There is potential race condition may happen at current aux
+isr handler implementation since it is always complete dp_aux_cmd_fifo_tx()
+even irq is not for aux read or write transaction. This may cause aux read
+transaction return premature if host aux data read is in the middle of
+waiting for sink to complete transferring data to host while irq happen.
+This will cause host's receiving buffer contains unexpected data. This
+patch fixes this problem by checking aux isr and return immediately at
+aux isr handler if there are no any isr status bits set.
+
+Current there is a bug report regrading eDP edid corruption happen during
+system booting up. After lengthy debugging to found that VIDEO_READY
+interrupt was continuously firing during system booting up which cause
+dp_aux_isr() to complete dp_aux_cmd_fifo_tx() prematurely to retrieve data
+from aux hardware buffer which is not yet contains complete data transfer
+from sink. This cause edid corruption.
+
+Follows are the signature at kernel logs when problem happen,
+EDID has corrupt header
+panel-simple-dp-aux aux-aea0000.edp: Couldn't identify panel via EDID
+
+Changes in v2:
+-- do complete if (ret == IRQ_HANDLED) ay dp-aux_isr()
+-- add more commit text
+
+Changes in v3:
+-- add Stephen suggested
+-- dp_aux_isr() return IRQ_XXX back to caller
+-- dp_ctrl_isr() return IRQ_XXX back to caller
+
+Changes in v4:
+-- split into two patches
+
+Changes in v5:
+-- delete empty line between tags
+
+Changes in v6:
+-- remove extra "that" and fixed line more than 75 char at commit text
+
+Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support")
+Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
+Tested-by: Douglas Anderson <dianders@chromium.org>
+Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Patchwork: https://patchwork.freedesktop.org/patch/516121/
+Link: https://lore.kernel.org/r/1672193785-11003-2-git-send-email-quic_khsieh@quicinc.com
+Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/msm/dp/dp_aux.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/gpu/drm/msm/dp/dp_aux.c
++++ b/drivers/gpu/drm/msm/dp/dp_aux.c
+@@ -423,6 +423,10 @@ void dp_aux_isr(struct drm_dp_aux *dp_au
+       isr = dp_catalog_aux_get_irq(aux->catalog);
++      /* no interrupts pending, return immediately */
++      if (!isr)
++              return;
++
+       if (!aux->cmd_busy)
+               return;
diff --git a/queue-6.1/dt-bindings-msm-dsi-controller-main-fix-description-of-core-clock.patch b/queue-6.1/dt-bindings-msm-dsi-controller-main-fix-description-of-core-clock.patch
new file mode 100644 (file)
index 0000000..7dc3b17
--- /dev/null
@@ -0,0 +1,35 @@
+From 654ffe4b793b42ed6b5909daff0b91809916d94e Mon Sep 17 00:00:00 2001
+From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
+Date: Fri, 23 Dec 2022 02:10:10 +0000
+Subject: dt-bindings: msm: dsi-controller-main: Fix description of core clock
+
+From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
+
+commit 654ffe4b793b42ed6b5909daff0b91809916d94e upstream.
+
+There's a typo in describing the core clock as an 'escape' clock. The
+accurate description is 'core'.
+
+Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
+Patchwork: https://patchwork.freedesktop.org/patch/515938/
+Link: https://lore.kernel.org/r/20221223021025.1646636-4-bryan.odonoghue@linaro.org
+Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
++++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+@@ -32,7 +32,7 @@ properties:
+       - description: Display byte clock
+       - description: Display byte interface clock
+       - description: Display pixel clock
+-      - description: Display escape clock
++      - description: Display core clock
+       - description: Display AHB clock
+       - description: Display AXI clock
diff --git a/queue-6.1/dt-bindings-msm-dsi-controller-main-fix-operating-points-v2-constraint.patch b/queue-6.1/dt-bindings-msm-dsi-controller-main-fix-operating-points-v2-constraint.patch
new file mode 100644 (file)
index 0000000..d2e10d8
--- /dev/null
@@ -0,0 +1,33 @@
+From cdf64343f91a1225e9e3d4ce4261962cd41b4ddd Mon Sep 17 00:00:00 2001
+From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
+Date: Fri, 23 Dec 2022 02:10:08 +0000
+Subject: dt-bindings: msm: dsi-controller-main: Fix operating-points-v2 constraint
+
+From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
+
+commit cdf64343f91a1225e9e3d4ce4261962cd41b4ddd upstream.
+
+The existing msm8916.dtsi does not depend on nor require operating points.
+
+Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
+Patchwork: https://patchwork.freedesktop.org/patch/515940/
+Link: https://lore.kernel.org/r/20221223021025.1646636-2-bryan.odonoghue@linaro.org
+Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
++++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+@@ -135,7 +135,6 @@ required:
+   - assigned-clocks
+   - assigned-clock-parents
+   - power-domains
+-  - operating-points-v2
+   - ports
+ additionalProperties: false
diff --git a/queue-6.1/dt-bindings-msm-dsi-controller-main-fix-power-domain-constraint.patch b/queue-6.1/dt-bindings-msm-dsi-controller-main-fix-power-domain-constraint.patch
new file mode 100644 (file)
index 0000000..7a04b79
--- /dev/null
@@ -0,0 +1,51 @@
+From a6f033938beb31f893302a93f83ec0b6460c6cac Mon Sep 17 00:00:00 2001
+From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
+Date: Fri, 23 Dec 2022 02:10:09 +0000
+Subject: dt-bindings: msm: dsi-controller-main: Fix power-domain constraint
+
+From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
+
+commit a6f033938beb31f893302a93f83ec0b6460c6cac upstream.
+
+power-domain is required for the sc7180 dispcc GDSC but not every qcom SoC
+has a similar dependency for example the apq8064.
+
+Most Qcom SoC's using mdss-dsi-ctrl seem to have the ability to
+power-collapse the MDP without collapsing DSI.
+
+For example the qcom vendor kernel commit for apq8084, msm8226, msm8916,
+msm8974.
+
+https://review.carbonrom.org/plugins/gitiles/CarbonROM/android_kernel_oneplus_msm8994/+/7b5c011a770daa2811778937ed646237a28a8694
+
+"ARM: dts: msm: add mdss gdsc supply to dsi controller device
+
+ It is possible for the DSI controller to be active when MDP is
+ power collapsed. DSI controller needs to have it's own vote for
+ mdss gdsc to ensure that gdsc remains on in such cases."
+
+This however doesn't appear to be the case for the apq8064 so we shouldn't
+be marking power-domain as required in yaml checks.
+
+Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
+Patchwork: https://patchwork.freedesktop.org/patch/515958/
+Link: https://lore.kernel.org/r/20221223021025.1646636-3-bryan.odonoghue@linaro.org
+Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
++++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml
+@@ -134,7 +134,6 @@ required:
+   - phy-names
+   - assigned-clocks
+   - assigned-clock-parents
+-  - power-domains
+   - ports
+ additionalProperties: false
diff --git a/queue-6.1/dt-bindings-msm-dsi-don-t-require-vcca-supply-on-14nm-phy.patch b/queue-6.1/dt-bindings-msm-dsi-don-t-require-vcca-supply-on-14nm-phy.patch
new file mode 100644 (file)
index 0000000..d821f71
--- /dev/null
@@ -0,0 +1,36 @@
+From a2117773c839a8439a3771e0c040b5c505b083a7 Mon Sep 17 00:00:00 2001
+From: Konrad Dybcio <konrad.dybcio@linaro.org>
+Date: Wed, 30 Nov 2022 14:58:07 +0100
+Subject: dt-bindings: msm/dsi: Don't require vcca-supply on 14nm PHY
+
+From: Konrad Dybcio <konrad.dybcio@linaro.org>
+
+commit a2117773c839a8439a3771e0c040b5c505b083a7 upstream.
+
+On some SoCs (hello SM6115) vcca-supply is not wired to any smd-rpm
+or rpmh regulator, but instead powered by the VDD_MX line, which is
+voted for in the DSI ctrl node.
+
+Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
+Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Fixes: 8fc939e72ff8 ("dt-bindings: msm: dsi: add yaml schemas for DSI PHY bindings")
+Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
+Patchwork: https://patchwork.freedesktop.org/patch/513555/
+Link: https://lore.kernel.org/r/20221130135807.45028-1-konrad.dybcio@linaro.org
+Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/devicetree/bindings/display/msm/dsi-phy-14nm.yaml |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/Documentation/devicetree/bindings/display/msm/dsi-phy-14nm.yaml
++++ b/Documentation/devicetree/bindings/display/msm/dsi-phy-14nm.yaml
+@@ -38,7 +38,6 @@ required:
+   - compatible
+   - reg
+   - reg-names
+-  - vcca-supply
+ unevaluatedProperties: false
diff --git a/queue-6.1/dt-bindings-msm-dsi-don-t-require-vdds-supply-on-10nm-phy.patch b/queue-6.1/dt-bindings-msm-dsi-don-t-require-vdds-supply-on-10nm-phy.patch
new file mode 100644 (file)
index 0000000..b0e10a8
--- /dev/null
@@ -0,0 +1,35 @@
+From ef11cb7a29c0e13031c968190ea8f86104e7fb6a Mon Sep 17 00:00:00 2001
+From: Konrad Dybcio <konrad.dybcio@linaro.org>
+Date: Wed, 16 Nov 2022 17:32:18 +0100
+Subject: dt-bindings: msm/dsi: Don't require vdds-supply on 10nm PHY
+
+From: Konrad Dybcio <konrad.dybcio@linaro.org>
+
+commit ef11cb7a29c0e13031c968190ea8f86104e7fb6a upstream.
+
+On some SoCs (hello SM6350) vdds-supply is not wired to any smd-rpm
+or rpmh regulator, but instead powered by the VDD_MX/mx.lvl line,
+which is voted for in the DSI ctrl node.
+
+Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
+Acked-by: Rob Herring <robh@kernel.org>
+Fixes: 8fc939e72ff8 ("dt-bindings: msm: dsi: add yaml schemas for DSI PHY bindings")
+Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
+Patchwork: https://patchwork.freedesktop.org/patch/511889/
+Link: https://lore.kernel.org/r/20221116163218.42449-1-konrad.dybcio@linaro.org
+Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/devicetree/bindings/display/msm/dsi-phy-10nm.yaml |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/Documentation/devicetree/bindings/display/msm/dsi-phy-10nm.yaml
++++ b/Documentation/devicetree/bindings/display/msm/dsi-phy-10nm.yaml
+@@ -69,7 +69,6 @@ required:
+   - compatible
+   - reg
+   - reg-names
+-  - vdds-supply
+ unevaluatedProperties: false
diff --git a/queue-6.1/dt-bindings-msm-dsi-phy-28nm-add-missing-qcom-dsi-phy-regulator-ldo-mode.patch b/queue-6.1/dt-bindings-msm-dsi-phy-28nm-add-missing-qcom-dsi-phy-regulator-ldo-mode.patch
new file mode 100644 (file)
index 0000000..e8663da
--- /dev/null
@@ -0,0 +1,36 @@
+From be79f805a1e1b95605c825f1c513bdd2c8b167ed Mon Sep 17 00:00:00 2001
+From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
+Date: Thu, 29 Dec 2022 12:44:38 +0000
+Subject: dt-bindings: msm: dsi-phy-28nm: Add missing qcom, dsi-phy-regulator-ldo-mode
+
+From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
+
+commit be79f805a1e1b95605c825f1c513bdd2c8b167ed upstream.
+
+Add in missing qcom,dsi-phy-regulator-ldo-mode to the 28nm DSI PHY.
+When converting from .txt to .yaml we missed this one.
+
+Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings")
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
+Patchwork: https://patchwork.freedesktop.org/patch/516205/
+Link: https://lore.kernel.org/r/20221229124438.504770-2-bryan.odonoghue@linaro.org
+Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml
++++ b/Documentation/devicetree/bindings/display/msm/dsi-phy-28nm.yaml
+@@ -34,6 +34,10 @@ properties:
+   vddio-supply:
+     description: Phandle to vdd-io regulator device node.
++  qcom,dsi-phy-regulator-ldo-mode:
++    type: boolean
++    description: Indicates if the LDO mode PHY regulator is wanted.
++
+ required:
+   - compatible
+   - reg
diff --git a/queue-6.1/firmware-psci-don-t-register-with-debugfs-if-psci-isn-t-available.patch b/queue-6.1/firmware-psci-don-t-register-with-debugfs-if-psci-isn-t-available.patch
new file mode 100644 (file)
index 0000000..d26829f
--- /dev/null
@@ -0,0 +1,58 @@
+From cef139299fd86098c6e3dbd389d1d0b2462d7710 Mon Sep 17 00:00:00 2001
+From: Marc Zyngier <maz@kernel.org>
+Date: Thu, 5 Jan 2023 09:08:34 +0000
+Subject: firmware/psci: Don't register with debugfs if PSCI isn't available
+
+From: Marc Zyngier <maz@kernel.org>
+
+commit cef139299fd86098c6e3dbd389d1d0b2462d7710 upstream.
+
+Contrary to popular belief, PSCI is not a universal property of an
+ARM/arm64 system. There is a garden variety of systems out there
+that don't (or even cannot) implement it.
+
+I'm the first one deplore such a situation, but hey...
+
+On such systems, a "cat /sys/kernel/debug/psci" results in
+fireworks, as no invocation callback is registered.
+
+Check for the invoke_psci_fn and psci_ops.get_version pointers
+before registering with the debugfs subsystem, avoiding the
+issue altogether.
+
+Fixes: 3137f2e60098 ("firmware/psci: Add debugfs support to ease debugging")
+Reported-by: Hector Martin <marcan@marcan.st>
+Signed-off-by: Marc Zyngier <maz@kernel.org>
+Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Cc: Mark Brown <broonie@kernel.org>
+Cc: Ulf Hansson <ulf.hansson@linaro.org>
+Cc: Arnd Bergmann <arnd@arndb.de>
+Cc: Mark Rutland <mark.rutland@arm.com>
+Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>
+Reviewed-by: Hector Martin <marcan@marcan.st>
+Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Acked-by: Mark Rutland <mark.rutland@arm.com>
+Link: https://lore.kernel.org/r/20230105090834.630238-1-maz@kernel.org
+Signed-off-by: Will Deacon <will@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/firmware/psci/psci.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
+index e7bcfca4159f..447ee4ea5c90 100644
+--- a/drivers/firmware/psci/psci.c
++++ b/drivers/firmware/psci/psci.c
+@@ -440,6 +440,9 @@ static const struct file_operations psci_debugfs_ops = {
+ static int __init psci_debugfs_init(void)
+ {
++      if (!invoke_psci_fn || !psci_ops.get_version)
++              return 0;
++
+       return PTR_ERR_OR_ZERO(debugfs_create_file("psci", 0444, NULL, NULL,
+                                                  &psci_debugfs_ops));
+ }
+-- 
+2.39.0
+
diff --git a/queue-6.1/firmware-psci-fix-mem_protect_range-function-numbers.patch b/queue-6.1/firmware-psci-fix-mem_protect_range-function-numbers.patch
new file mode 100644 (file)
index 0000000..233d436
--- /dev/null
@@ -0,0 +1,53 @@
+From f3dc61cde80d48751999c4cb46daf3b2185e6895 Mon Sep 17 00:00:00 2001
+From: Will Deacon <will@kernel.org>
+Date: Fri, 25 Nov 2022 10:18:26 +0000
+Subject: firmware/psci: Fix MEM_PROTECT_RANGE function numbers
+
+From: Will Deacon <will@kernel.org>
+
+commit f3dc61cde80d48751999c4cb46daf3b2185e6895 upstream.
+
+PSCI v1.1 offers 32-bit and 64-bit variants of the MEM_PROTECT_RANGE
+call using function identifier 20.
+
+Fix the incorrect definitions of the MEM_PROTECT_CHECK_RANGE calls in
+the PSCI UAPI header.
+
+Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>
+Cc: Arnd Bergmann <arnd@arndb.de>
+Fixes: 3137f2e60098 ("firmware/psci: Add debugfs support to ease debugging")
+Acked-by: Marc Zyngier <maz@kernel.org>
+Acked-by: Mark Rutland <mark.rutland@arm.com>
+Link: https://lore.kernel.org/r/20221125101826.22404-1-will@kernel.org
+Signed-off-by: Will Deacon <will@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/uapi/linux/psci.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/uapi/linux/psci.h b/include/uapi/linux/psci.h
+index 3511095c2702..42a40ad3fb62 100644
+--- a/include/uapi/linux/psci.h
++++ b/include/uapi/linux/psci.h
+@@ -58,7 +58,7 @@
+ #define PSCI_1_1_FN_SYSTEM_RESET2             PSCI_0_2_FN(18)
+ #define PSCI_1_1_FN_MEM_PROTECT                       PSCI_0_2_FN(19)
+-#define PSCI_1_1_FN_MEM_PROTECT_CHECK_RANGE   PSCI_0_2_FN(19)
++#define PSCI_1_1_FN_MEM_PROTECT_CHECK_RANGE   PSCI_0_2_FN(20)
+ #define PSCI_1_0_FN64_CPU_DEFAULT_SUSPEND     PSCI_0_2_FN64(12)
+ #define PSCI_1_0_FN64_NODE_HW_STATE           PSCI_0_2_FN64(13)
+@@ -67,7 +67,7 @@
+ #define PSCI_1_0_FN64_STAT_COUNT              PSCI_0_2_FN64(17)
+ #define PSCI_1_1_FN64_SYSTEM_RESET2           PSCI_0_2_FN64(18)
+-#define PSCI_1_1_FN64_MEM_PROTECT_CHECK_RANGE PSCI_0_2_FN64(19)
++#define PSCI_1_1_FN64_MEM_PROTECT_CHECK_RANGE PSCI_0_2_FN64(20)
+ /* PSCI v0.2 power state encoding for CPU_SUSPEND function */
+ #define PSCI_0_2_POWER_STATE_ID_MASK          0xffff
+-- 
+2.39.0
+
diff --git a/queue-6.1/iavf-iavf_main-actually-log-src-mask-when-talking-about-it.patch b/queue-6.1/iavf-iavf_main-actually-log-src-mask-when-talking-about-it.patch
new file mode 100644 (file)
index 0000000..4fdd77e
--- /dev/null
@@ -0,0 +1,35 @@
+From 6650c8e906ce58404bfdfceceeba7bd10d397d40 Mon Sep 17 00:00:00 2001
+From: Daniil Tatianin <d-tatianin@yandex-team.ru>
+Date: Tue, 20 Dec 2022 09:32:46 +0300
+Subject: iavf/iavf_main: actually log ->src mask when talking about it
+
+From: Daniil Tatianin <d-tatianin@yandex-team.ru>
+
+commit 6650c8e906ce58404bfdfceceeba7bd10d397d40 upstream.
+
+This fixes a copy-paste issue where dev_err would log the dst mask even
+though it is clearly talking about src.
+
+Found by Linux Verification Center (linuxtesting.org) with the SVACE
+static analysis tool.
+
+Fixes: 0075fa0fadd0 ("i40evf: Add support to apply cloud filters")
+Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
+Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
+Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/intel/iavf/iavf_main.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
++++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
+@@ -3850,7 +3850,7 @@ static int iavf_parse_cls_flower(struct
+                               field_flags |= IAVF_CLOUD_FIELD_IIP;
+                       } else {
+                               dev_err(&adapter->pdev->dev, "Bad ip src mask 0x%08x\n",
+-                                      be32_to_cpu(match.mask->dst));
++                                      be32_to_cpu(match.mask->src));
+                               return -EINVAL;
+                       }
+               }
diff --git a/queue-6.1/io_uring-fdinfo-include-locked-hash-table-in-fdinfo-output.patch b/queue-6.1/io_uring-fdinfo-include-locked-hash-table-in-fdinfo-output.patch
new file mode 100644 (file)
index 0000000..124df6b
--- /dev/null
@@ -0,0 +1,57 @@
+From ea97cbebaf861d99c3e892275147e6fca6d2c1ca Mon Sep 17 00:00:00 2001
+From: Jens Axboe <axboe@kernel.dk>
+Date: Tue, 10 Jan 2023 10:24:52 -0700
+Subject: io_uring/fdinfo: include locked hash table in fdinfo output
+
+From: Jens Axboe <axboe@kernel.dk>
+
+commit ea97cbebaf861d99c3e892275147e6fca6d2c1ca upstream.
+
+A previous commit split the hash table for polled requests into two
+parts, but didn't get the fdinfo output updated. This means that it's
+less useful for debugging, as we may think a given request is not pending
+poll.
+
+Fix this up by dumping the locked hash table contents too.
+
+Fixes: 9ca9fb24d5fe ("io_uring: mutex locked poll hashing")
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ io_uring/fdinfo.c |   12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+--- a/io_uring/fdinfo.c
++++ b/io_uring/fdinfo.c
+@@ -170,12 +170,11 @@ static __cold void __io_uring_show_fdinf
+               xa_for_each(&ctx->personalities, index, cred)
+                       io_uring_show_cred(m, index, cred);
+       }
+-      if (has_lock)
+-              mutex_unlock(&ctx->uring_lock);
+       seq_puts(m, "PollList:\n");
+       for (i = 0; i < (1U << ctx->cancel_table.hash_bits); i++) {
+               struct io_hash_bucket *hb = &ctx->cancel_table.hbs[i];
++              struct io_hash_bucket *hbl = &ctx->cancel_table_locked.hbs[i];
+               struct io_kiocb *req;
+               spin_lock(&hb->lock);
+@@ -183,8 +182,17 @@ static __cold void __io_uring_show_fdinf
+                       seq_printf(m, "  op=%d, task_works=%d\n", req->opcode,
+                                       task_work_pending(req->task));
+               spin_unlock(&hb->lock);
++
++              if (!has_lock)
++                      continue;
++              hlist_for_each_entry(req, &hbl->list, hash_node)
++                      seq_printf(m, "  op=%d, task_works=%d\n", req->opcode,
++                                      task_work_pending(req->task));
+       }
++      if (has_lock)
++              mutex_unlock(&ctx->uring_lock);
++
+       seq_puts(m, "CqOverflowList:\n");
+       spin_lock(&ctx->completion_lock);
+       list_for_each_entry(ocqe, &ctx->cq_overflow_list, list) {
diff --git a/queue-6.1/ipv6-raw-deduct-extension-header-length-in-rawv6_push_pending_frames.patch b/queue-6.1/ipv6-raw-deduct-extension-header-length-in-rawv6_push_pending_frames.patch
new file mode 100644 (file)
index 0000000..aab15d9
--- /dev/null
@@ -0,0 +1,42 @@
+From cb3e9864cdbe35ff6378966660edbcbac955fe17 Mon Sep 17 00:00:00 2001
+From: Herbert Xu <herbert@gondor.apana.org.au>
+Date: Tue, 10 Jan 2023 08:59:06 +0800
+Subject: ipv6: raw: Deduct extension header length in rawv6_push_pending_frames
+
+From: Herbert Xu <herbert@gondor.apana.org.au>
+
+commit cb3e9864cdbe35ff6378966660edbcbac955fe17 upstream.
+
+The total cork length created by ip6_append_data includes extension
+headers, so we must exclude them when comparing them against the
+IPV6_CHECKSUM offset which does not include extension headers.
+
+Reported-by: Kyle Zeng <zengyhkyle@gmail.com>
+Fixes: 357b40a18b04 ("[IPV6]: IPV6_CHECKSUM socket option can corrupt kernel memory")
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/ipv6/raw.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/net/ipv6/raw.c
++++ b/net/ipv6/raw.c
+@@ -505,6 +505,7 @@ csum_copy_err:
+ static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6,
+                                    struct raw6_sock *rp)
+ {
++      struct ipv6_txoptions *opt;
+       struct sk_buff *skb;
+       int err = 0;
+       int offset;
+@@ -522,6 +523,9 @@ static int rawv6_push_pending_frames(str
+       offset = rp->offset;
+       total_len = inet_sk(sk)->cork.base.length;
++      opt = inet6_sk(sk)->cork.opt;
++      total_len -= opt ? opt->opt_flen : 0;
++
+       if (offset >= total_len - 1) {
+               err = -EINVAL;
+               ip6_flush_pending_frames(sk);
diff --git a/queue-6.1/ixgbe-fix-pci-device-refcount-leak.patch b/queue-6.1/ixgbe-fix-pci-device-refcount-leak.patch
new file mode 100644 (file)
index 0000000..cfb3780
--- /dev/null
@@ -0,0 +1,70 @@
+From b93fb4405fcb5112c5739c5349afb52ec7f15c07 Mon Sep 17 00:00:00 2001
+From: Yang Yingliang <yangyingliang@huawei.com>
+Date: Tue, 29 Nov 2022 09:57:48 +0800
+Subject: ixgbe: fix pci device refcount leak
+
+From: Yang Yingliang <yangyingliang@huawei.com>
+
+commit b93fb4405fcb5112c5739c5349afb52ec7f15c07 upstream.
+
+As the comment of pci_get_domain_bus_and_slot() says, it
+returns a PCI device with refcount incremented, when finish
+using it, the caller must decrement the reference count by
+calling pci_dev_put().
+
+In ixgbe_get_first_secondary_devfn() and ixgbe_x550em_a_has_mii(),
+pci_dev_put() is called to avoid leak.
+
+Fixes: 8fa10ef01260 ("ixgbe: register a mdiobus")
+Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
+Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
+Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c |   14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
++++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
+@@ -855,9 +855,11 @@ static struct pci_dev *ixgbe_get_first_s
+       rp_pdev = pci_get_domain_bus_and_slot(0, 0, devfn);
+       if (rp_pdev && rp_pdev->subordinate) {
+               bus = rp_pdev->subordinate->number;
++              pci_dev_put(rp_pdev);
+               return pci_get_domain_bus_and_slot(0, bus, 0);
+       }
++      pci_dev_put(rp_pdev);
+       return NULL;
+ }
+@@ -874,6 +876,7 @@ static bool ixgbe_x550em_a_has_mii(struc
+       struct ixgbe_adapter *adapter = hw->back;
+       struct pci_dev *pdev = adapter->pdev;
+       struct pci_dev *func0_pdev;
++      bool has_mii = false;
+       /* For the C3000 family of SoCs (x550em_a) the internal ixgbe devices
+        * are always downstream of root ports @ 0000:00:16.0 & 0000:00:17.0
+@@ -884,15 +887,16 @@ static bool ixgbe_x550em_a_has_mii(struc
+       func0_pdev = ixgbe_get_first_secondary_devfn(PCI_DEVFN(0x16, 0));
+       if (func0_pdev) {
+               if (func0_pdev == pdev)
+-                      return true;
+-              else
+-                      return false;
++                      has_mii = true;
++              goto out;
+       }
+       func0_pdev = ixgbe_get_first_secondary_devfn(PCI_DEVFN(0x17, 0));
+       if (func0_pdev == pdev)
+-              return true;
++              has_mii = true;
+-      return false;
++out:
++      pci_dev_put(func0_pdev);
++      return has_mii;
+ }
+ /**
diff --git a/queue-6.1/platform-surface-aggregator-ignore-command-messages-not-intended-for-us.patch b/queue-6.1/platform-surface-aggregator-ignore-command-messages-not-intended-for-us.patch
new file mode 100644 (file)
index 0000000..fd73166
--- /dev/null
@@ -0,0 +1,74 @@
+From ae0fa0a3126a86c801c3220fcd8eefe03aa39f3e Mon Sep 17 00:00:00 2001
+From: Maximilian Luz <luzmaximilian@gmail.com>
+Date: Fri, 2 Dec 2022 23:33:19 +0100
+Subject: platform/surface: aggregator: Ignore command messages not intended for us
+
+From: Maximilian Luz <luzmaximilian@gmail.com>
+
+commit ae0fa0a3126a86c801c3220fcd8eefe03aa39f3e upstream.
+
+It is possible that we (the host/kernel driver) receive command messages
+that are not intended for us. Ignore those for now.
+
+The whole story is a bit more complicated: It is possible to enable
+debug output on SAM, which is sent via SSH command messages. By default
+this output is sent to a debug connector, with its own target ID
+(TID=0x03). It is possible to override the target of the debug output
+and set it to the host/kernel driver. This, however, does not change the
+original target ID of the message. Meaning, we receive messages with
+TID=0x03 (debug) but expect to only receive messages with TID=0x00
+(host).
+
+The problem is that the different target ID also comes with a different
+scope of request IDs. In particular, these do not follow the standard
+event rules (i.e. do not fall into a set of small reserved values).
+Therefore, current message handling interprets them as responses to
+pending requests and tries to match them up via the request ID. However,
+these debug output messages are not in fact responses, and therefore
+this will at best fail to find the request and at worst pass on the
+wrong data as response for a request.
+
+Therefore ignore any command messages not intended for us (host) for
+now. We can implement support for the debug messages once we have a
+better understanding of them.
+
+Note that this may also provide a bit more stability and avoid some
+driver confusion in case any other targets want to talk to us in the
+future, since we don't yet know what to do with those as well. A warning
+for the dropped messages should suffice for now and also give us a
+chance of discovering new targets if they come along without any
+potential for bugs/instabilities.
+
+Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem")
+Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
+Link: https://lore.kernel.org/r/20221202223327.690880-2-luzmaximilian@gmail.com
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/surface/aggregator/ssh_request_layer.c |   14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+--- a/drivers/platform/surface/aggregator/ssh_request_layer.c
++++ b/drivers/platform/surface/aggregator/ssh_request_layer.c
+@@ -916,6 +916,20 @@ static void ssh_rtl_rx_command(struct ss
+       if (sshp_parse_command(dev, data, &command, &command_data))
+               return;
++      /*
++       * Check if the message was intended for us. If not, drop it.
++       *
++       * Note: We will need to change this to handle debug messages. On newer
++       * generation devices, these seem to be sent to tid_out=0x03. We as
++       * host can still receive them as they can be forwarded via an override
++       * option on SAM, but doing so does not change tid_out=0x00.
++       */
++      if (command->tid_out != 0x00) {
++              rtl_warn(rtl, "rtl: dropping message not intended for us (tid = %#04x)\n",
++                       command->tid_out);
++              return;
++      }
++
+       if (ssh_rqid_is_event(get_unaligned_le16(&command->rqid)))
+               ssh_rtl_rx_event(rtl, command, &command_data);
+       else
diff --git a/queue-6.1/platform-x86-asus-wmi-don-t-load-fan-curves-without-fan.patch b/queue-6.1/platform-x86-asus-wmi-don-t-load-fan-curves-without-fan.patch
new file mode 100644 (file)
index 0000000..02347d1
--- /dev/null
@@ -0,0 +1,40 @@
+From 01fd7e7851ba2275662f771ee17d1f80e7bbfa52 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <linux@weissschuh.net>
+Date: Wed, 21 Dec 2022 17:59:51 +0000
+Subject: platform/x86: asus-wmi: Don't load fan curves without fan
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Thomas Weißschuh <linux@weissschuh.net>
+
+commit 01fd7e7851ba2275662f771ee17d1f80e7bbfa52 upstream.
+
+If we do not have a fan it does not make sense to load curves for it.
+This removes the following warnings from the kernel log:
+
+asus_wmi: fan_curve_get_factory_default (0x00110024) failed: -19
+asus_wmi: fan_curve_get_factory_default (0x00110025) failed: -19
+
+Fixes: a2bdf10ce96e ("platform/x86: asus-wmi: Increase FAN_CURVE_BUF_LEN to 32")
+Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
+Link: https://lore.kernel.org/r/20221221-asus-fan-v1-3-e07f3949725b@weissschuh.net
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/asus-wmi.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/platform/x86/asus-wmi.c
++++ b/drivers/platform/x86/asus-wmi.c
+@@ -2436,6 +2436,9 @@ static int fan_curve_check_present(struc
+       *available = false;
++      if (asus->fan_type == FAN_TYPE_NONE)
++              return 0;
++
+       err = fan_curve_get_factory_default(asus, fan_dev);
+       if (err) {
+               return 0;
diff --git a/queue-6.1/platform-x86-dell-privacy-fix-sw_camera_lens_cover-reporting.patch b/queue-6.1/platform-x86-dell-privacy-fix-sw_camera_lens_cover-reporting.patch
new file mode 100644 (file)
index 0000000..a10ae36
--- /dev/null
@@ -0,0 +1,80 @@
+From 1af7fef0d9d3fa075bf4e850f705df1fe97d33ce Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Wed, 21 Dec 2022 23:07:23 +0100
+Subject: platform/x86: dell-privacy: Fix SW_CAMERA_LENS_COVER reporting
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit 1af7fef0d9d3fa075bf4e850f705df1fe97d33ce upstream.
+
+Use KE_VSW instead of KE_SW for the SW_CAMERA_LENS_COVER key_entry
+and get the value of the switch from the status field when handling
+SW_CAMERA_LENS_COVER events, instead of always reporting 0.
+
+Also correctly set the initial SW_CAMERA_LENS_COVER value.
+
+Fixes: 8af9fa37b8a3 ("platform/x86: dell-privacy: Add support for Dell hardware privacy")
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Link: https://lore.kernel.org/r/20221221220724.119594-1-hdegoede@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/dell/dell-wmi-privacy.c |   22 ++++++++++++++++------
+ 1 file changed, 16 insertions(+), 6 deletions(-)
+
+--- a/drivers/platform/x86/dell/dell-wmi-privacy.c
++++ b/drivers/platform/x86/dell/dell-wmi-privacy.c
+@@ -61,7 +61,7 @@ static const struct key_entry dell_wmi_k
+       /* privacy mic mute */
+       { KE_KEY, 0x0001, { KEY_MICMUTE } },
+       /* privacy camera mute */
+-      { KE_SW,  0x0002, { SW_CAMERA_LENS_COVER } },
++      { KE_VSW, 0x0002, { SW_CAMERA_LENS_COVER } },
+       { KE_END, 0},
+ };
+@@ -115,11 +115,15 @@ bool dell_privacy_process_event(int type
+       switch (code) {
+       case DELL_PRIVACY_AUDIO_EVENT: /* Mic mute */
+-      case DELL_PRIVACY_CAMERA_EVENT: /* Camera mute */
+               priv->last_status = status;
+               sparse_keymap_report_entry(priv->input_dev, key, 1, true);
+               ret = true;
+               break;
++      case DELL_PRIVACY_CAMERA_EVENT: /* Camera mute */
++              priv->last_status = status;
++              sparse_keymap_report_entry(priv->input_dev, key, !(status & CAMERA_STATUS), false);
++              ret = true;
++              break;
+       default:
+               dev_dbg(&priv->wdev->dev, "unknown event type 0x%04x 0x%04x\n", type, code);
+       }
+@@ -304,6 +308,11 @@ static int dell_privacy_wmi_probe(struct
+       dev_set_drvdata(&wdev->dev, priv);
+       priv->wdev = wdev;
++
++      ret = get_current_status(priv->wdev);
++      if (ret)
++              return ret;
++
+       /* create evdev passing interface */
+       priv->input_dev = devm_input_allocate_device(&wdev->dev);
+       if (!priv->input_dev)
+@@ -342,11 +351,12 @@ static int dell_privacy_wmi_probe(struct
+       priv->input_dev->name = "Dell Privacy Driver";
+       priv->input_dev->id.bustype = BUS_HOST;
+-      ret = input_register_device(priv->input_dev);
+-      if (ret)
+-              return ret;
++      /* Report initial camera-cover status */
++      if (priv->features_present & BIT(DELL_PRIVACY_TYPE_CAMERA))
++              input_report_switch(priv->input_dev, SW_CAMERA_LENS_COVER,
++                                  !(priv->last_status & CAMERA_STATUS));
+-      ret = get_current_status(priv->wdev);
++      ret = input_register_device(priv->input_dev);
+       if (ret)
+               return ret;
diff --git a/queue-6.1/platform-x86-dell-privacy-only-register-sw_camera_lens_cover-if-present.patch b/queue-6.1/platform-x86-dell-privacy-only-register-sw_camera_lens_cover-if-present.patch
new file mode 100644 (file)
index 0000000..f92cda0
--- /dev/null
@@ -0,0 +1,65 @@
+From 6dc485f9940df8105ea729cbeb7a7d18d409dde5 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Wed, 21 Dec 2022 23:07:24 +0100
+Subject: platform/x86: dell-privacy: Only register SW_CAMERA_LENS_COVER if present
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit 6dc485f9940df8105ea729cbeb7a7d18d409dde5 upstream.
+
+Unlike keys where userspace only reacts to keypresses, userspace may act
+on switches in both (0 and 1) of their positions.
+
+For example if a SW_TABLET_MODE switch is registered then GNOME will not
+automatically show the onscreen keyboard when a text field gets focus on
+touchscreen devices when SW_TABLET_MODE reports 0 and when SW_TABLET_MODE
+reports 1 libinput will block (filter out) builtin keyboard and touchpad
+events.
+
+So to avoid unwanted side-effects EV_SW type inputs should only be
+registered if they are actually present, only register SW_CAMERA_LENS_COVER
+if it is actually there.
+
+Fixes: 8af9fa37b8a3 ("platform/x86: dell-privacy: Add support for Dell hardware privacy")
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Link: https://lore.kernel.org/r/20221221220724.119594-2-hdegoede@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/dell/dell-wmi-privacy.c |   19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+--- a/drivers/platform/x86/dell/dell-wmi-privacy.c
++++ b/drivers/platform/x86/dell/dell-wmi-privacy.c
+@@ -292,7 +292,7 @@ static int dell_privacy_wmi_probe(struct
+ {
+       struct privacy_wmi_data *priv;
+       struct key_entry *keymap;
+-      int ret, i;
++      int ret, i, j;
+       ret = wmi_has_guid(DELL_PRIVACY_GUID);
+       if (!ret)
+@@ -318,9 +318,20 @@ static int dell_privacy_wmi_probe(struct
+       /* remap the keymap code with Dell privacy key type 0x12 as prefix
+        * KEY_MICMUTE scancode will be reported as 0x120001
+        */
+-      for (i = 0; i < ARRAY_SIZE(dell_wmi_keymap_type_0012); i++) {
+-              keymap[i] = dell_wmi_keymap_type_0012[i];
+-              keymap[i].code |= (0x0012 << 16);
++      for (i = 0, j = 0; i < ARRAY_SIZE(dell_wmi_keymap_type_0012); i++) {
++              /*
++               * Unlike keys where only presses matter, userspace may act
++               * on switches in both of their positions. Only register
++               * SW_CAMERA_LENS_COVER if it is actually there.
++               */
++              if (dell_wmi_keymap_type_0012[i].type == KE_VSW &&
++                  dell_wmi_keymap_type_0012[i].sw.code == SW_CAMERA_LENS_COVER &&
++                  !(priv->features_present & BIT(DELL_PRIVACY_TYPE_CAMERA)))
++                      continue;
++
++              keymap[j] = dell_wmi_keymap_type_0012[i];
++              keymap[j].code |= (0x0012 << 16);
++              j++;
+       }
+       ret = sparse_keymap_setup(priv->input_dev, keymap, NULL);
+       kfree(keymap);
diff --git a/queue-6.1/platform-x86-ideapad-laptop-add-legion-5-15arh05-dmi-id-to-set_fn_lock_led_list.patch b/queue-6.1/platform-x86-ideapad-laptop-add-legion-5-15arh05-dmi-id-to-set_fn_lock_led_list.patch
new file mode 100644 (file)
index 0000000..81420b0
--- /dev/null
@@ -0,0 +1,39 @@
+From f4b7f8febd4d9b615fbec2a06bf352b9c3729b11 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Thu, 15 Dec 2022 16:43:57 +0100
+Subject: platform/x86: ideapad-laptop: Add Legion 5 15ARH05 DMI id to set_fn_lock_led_list[]
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit f4b7f8febd4d9b615fbec2a06bf352b9c3729b11 upstream.
+
+The Lenovo Legion 5 15ARH05 needs ideapad-laptop to call SALS_FNLOCK_ON /
+SALS_FNLOCK_OFF on Fn-lock state change to get the LED in the Fn key to
+correctly reflect the Fn-lock state.
+
+Add a DMI match for the Legion 5 15ARH05 to the set_fn_lock_led_list[]
+table for this.
+
+Fixes: 81a5603a0f50 ("platform/x86: ideapad-laptop: Fix interrupt storm on fn-lock toggle on some Yoga laptops")
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Link: https://lore.kernel.org/r/20221215154357.123876-1-hdegoede@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/ideapad-laptop.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/platform/x86/ideapad-laptop.c
++++ b/drivers/platform/x86/ideapad-laptop.c
+@@ -1615,6 +1615,12 @@ static const struct dmi_system_id set_fn
+                       DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Legion R7000P2020H"),
+               }
+       },
++      {
++              .matches = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
++                      DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Legion 5 15ARH05"),
++              }
++      },
+       {}
+ };
diff --git a/queue-6.1/platform-x86-int3472-discrete-ensure-the-clk-power-enable-pins-are-in-output-mode.patch b/queue-6.1/platform-x86-int3472-discrete-ensure-the-clk-power-enable-pins-are-in-output-mode.patch
new file mode 100644 (file)
index 0000000..e044da5
--- /dev/null
@@ -0,0 +1,66 @@
+From cf5ac2d45f6e4d11ad78e7b10ae9a4121ba5e995 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Wed, 11 Jan 2023 21:14:26 +0100
+Subject: platform/x86: int3472/discrete: Ensure the clk/power enable pins are in output mode
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit cf5ac2d45f6e4d11ad78e7b10ae9a4121ba5e995 upstream.
+
+acpi_get_and_request_gpiod() does not take a gpio_lookup_flags argument
+specifying that the pins direction should be initialized to a specific
+value.
+
+This means that in some cases the pins might be left in input mode, causing
+the gpiod_set() calls made to enable the clk / regulator to not work.
+
+One example of this problem is the clk-enable GPIO for the ov01a1s sensor
+on a Dell Latitude 9420 being left in input mode causing the clk to
+never get enabled.
+
+Explicitly set the direction of the pins to output to fix this.
+
+Fixes: 5de691bffe57 ("platform/x86: Add intel_skl_int3472 driver")
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Reviewed-by: Andy Shevchenko <andy@kernel.org>
+Reviewed-by: Daniel Scally <djrscally@gmail.com>
+Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
+Link: https://lore.kernel.org/r/20230111201426.947853-1-hdegoede@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/intel/int3472/clk_and_regulator.c |    3 +++
+ drivers/platform/x86/intel/int3472/discrete.c          |    4 ++++
+ 2 files changed, 7 insertions(+)
+
+--- a/drivers/platform/x86/intel/int3472/clk_and_regulator.c
++++ b/drivers/platform/x86/intel/int3472/clk_and_regulator.c
+@@ -181,6 +181,9 @@ int skl_int3472_register_regulator(struc
+               return PTR_ERR(int3472->regulator.gpio);
+       }
++      /* Ensure the pin is in output mode and non-active state */
++      gpiod_direction_output(int3472->regulator.gpio, 0);
++
+       cfg.dev = &int3472->adev->dev;
+       cfg.init_data = &init_data;
+       cfg.ena_gpiod = int3472->regulator.gpio;
+--- a/drivers/platform/x86/intel/int3472/discrete.c
++++ b/drivers/platform/x86/intel/int3472/discrete.c
+@@ -168,6 +168,8 @@ static int skl_int3472_map_gpio_to_clk(s
+                       return (PTR_ERR(gpio));
+               int3472->clock.ena_gpio = gpio;
++              /* Ensure the pin is in output mode and non-active state */
++              gpiod_direction_output(int3472->clock.ena_gpio, 0);
+               break;
+       case INT3472_GPIO_TYPE_PRIVACY_LED:
+               gpio = acpi_get_and_request_gpiod(path, pin, "int3472,privacy-led");
+@@ -175,6 +177,8 @@ static int skl_int3472_map_gpio_to_clk(s
+                       return (PTR_ERR(gpio));
+               int3472->clock.led_gpio = gpio;
++              /* Ensure the pin is in output mode and non-active state */
++              gpiod_direction_output(int3472->clock.led_gpio, 0);
+               break;
+       default:
+               dev_err(int3472->dev, "Invalid GPIO type 0x%02x for clock\n", type);
diff --git a/queue-6.1/platform-x86-sony-laptop-don-t-turn-off-0x153-keyboard-backlight-during-probe.patch b/queue-6.1/platform-x86-sony-laptop-don-t-turn-off-0x153-keyboard-backlight-during-probe.patch
new file mode 100644 (file)
index 0000000..17e17b2
--- /dev/null
@@ -0,0 +1,58 @@
+From ad75bd85b1db69c97eefea07b375567821f6ef58 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Tue, 13 Dec 2022 13:29:43 +0100
+Subject: platform/x86: sony-laptop: Don't turn off 0x153 keyboard backlight during probe
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit ad75bd85b1db69c97eefea07b375567821f6ef58 upstream.
+
+The 0x153 version of the kbd backlight control SNC handle has no separate
+address to probe if the backlight is there.
+
+This turns the probe call into a set keyboard backlight call with a value
+of 0 turning off the keyboard backlight.
+
+Skip probing when there is no separate probe address to avoid this.
+
+Link: https://bugzilla.redhat.com/show_bug.cgi?id=1583752
+Fixes: 800f20170dcf ("Keyboard backlight control for some Vaio Fit models")
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Reviewed-by: Mattia Dongili <malattia@linux.it>
+Link: https://lore.kernel.org/r/20221213122943.11123-1-hdegoede@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/sony-laptop.c |   21 ++++++++++++++-------
+ 1 file changed, 14 insertions(+), 7 deletions(-)
+
+--- a/drivers/platform/x86/sony-laptop.c
++++ b/drivers/platform/x86/sony-laptop.c
+@@ -1888,14 +1888,21 @@ static int sony_nc_kbd_backlight_setup(s
+               break;
+       }
+-      ret = sony_call_snc_handle(handle, probe_base, &result);
+-      if (ret)
+-              return ret;
++      /*
++       * Only probe if there is a separate probe_base, otherwise the probe call
++       * is equivalent to __sony_nc_kbd_backlight_mode_set(0), resulting in
++       * the keyboard backlight being turned off.
++       */
++      if (probe_base) {
++              ret = sony_call_snc_handle(handle, probe_base, &result);
++              if (ret)
++                      return ret;
+-      if ((handle == 0x0137 && !(result & 0x02)) ||
+-                      !(result & 0x01)) {
+-              dprintk("no backlight keyboard found\n");
+-              return 0;
++              if ((handle == 0x0137 && !(result & 0x02)) ||
++                              !(result & 0x01)) {
++                      dprintk("no backlight keyboard found\n");
++                      return 0;
++              }
+       }
+       kbdbl_ctl = kzalloc(sizeof(*kbdbl_ctl), GFP_KERNEL);
diff --git a/queue-6.1/platform-x86-thinkpad_acpi-fix-profile-mode-display-in-amt-mode.patch b/queue-6.1/platform-x86-thinkpad_acpi-fix-profile-mode-display-in-amt-mode.patch
new file mode 100644 (file)
index 0000000..ff734e5
--- /dev/null
@@ -0,0 +1,100 @@
+From fde5f74ccfc771941b018b5415fa9664426e10ad Mon Sep 17 00:00:00 2001
+From: Mark Pearson <mpearson-lenovo@squebb.ca>
+Date: Thu, 12 Jan 2023 17:12:28 -0500
+Subject: platform/x86: thinkpad_acpi: Fix profile mode display in AMT mode
+
+From: Mark Pearson <mpearson-lenovo@squebb.ca>
+
+commit fde5f74ccfc771941b018b5415fa9664426e10ad upstream.
+
+Recently AMT mode was enabled (somewhat unexpectedly) on the Lenovo
+Z13 platform. The FW is advertising it is available and the driver tries
+to use it - unfortunately it reports the profile mode incorrectly.
+
+Note, there is also some extra work needed to enable the dynamic aspect
+of AMT support that I will be following up with; but more testing is
+needed first. This patch just fixes things so the profiles are reported
+correctly.
+
+Link: https://gitlab.freedesktop.org/hadess/power-profiles-daemon/-/issues/115
+Fixes: 46dcbc61b739 ("platform/x86: thinkpad-acpi: Add support for automatic mode transitions")
+
+Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
+Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
+Link: https://lore.kernel.org/r/20230112221228.490946-1-mpearson-lenovo@squebb.ca
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/thinkpad_acpi.c |   23 +++++++++++++++++------
+ 1 file changed, 17 insertions(+), 6 deletions(-)
+
+--- a/drivers/platform/x86/thinkpad_acpi.c
++++ b/drivers/platform/x86/thinkpad_acpi.c
+@@ -10315,9 +10315,11 @@ static DEFINE_MUTEX(dytc_mutex);
+ static int dytc_capabilities;
+ static bool dytc_mmc_get_available;
+-static int convert_dytc_to_profile(int dytcmode, enum platform_profile_option *profile)
++static int convert_dytc_to_profile(int funcmode, int dytcmode,
++              enum platform_profile_option *profile)
+ {
+-      if (dytc_capabilities & BIT(DYTC_FC_MMC)) {
++      switch (funcmode) {
++      case DYTC_FUNCTION_MMC:
+               switch (dytcmode) {
+               case DYTC_MODE_MMC_LOWPOWER:
+                       *profile = PLATFORM_PROFILE_LOW_POWER;
+@@ -10333,8 +10335,7 @@ static int convert_dytc_to_profile(int d
+                       return -EINVAL;
+               }
+               return 0;
+-      }
+-      if (dytc_capabilities & BIT(DYTC_FC_PSC)) {
++      case DYTC_FUNCTION_PSC:
+               switch (dytcmode) {
+               case DYTC_MODE_PSC_LOWPOWER:
+                       *profile = PLATFORM_PROFILE_LOW_POWER;
+@@ -10348,6 +10349,14 @@ static int convert_dytc_to_profile(int d
+               default: /* Unknown mode */
+                       return -EINVAL;
+               }
++              return 0;
++      case DYTC_FUNCTION_AMT:
++              /* For now return balanced. It's the closest we have to 'auto' */
++              *profile =  PLATFORM_PROFILE_BALANCED;
++              return 0;
++      default:
++              /* Unknown function */
++              return -EOPNOTSUPP;
+       }
+       return 0;
+ }
+@@ -10496,6 +10505,7 @@ static int dytc_profile_set(struct platf
+               err = dytc_command(DYTC_SET_COMMAND(DYTC_FUNCTION_PSC, perfmode, 1), &output);
+               if (err)
+                       goto unlock;
++
+               /* system supports AMT, activate it when on balanced */
+               if (dytc_capabilities & BIT(DYTC_FC_AMT))
+                       dytc_control_amt(profile == PLATFORM_PROFILE_BALANCED);
+@@ -10511,7 +10521,7 @@ static void dytc_profile_refresh(void)
+ {
+       enum platform_profile_option profile;
+       int output, err = 0;
+-      int perfmode;
++      int perfmode, funcmode;
+       mutex_lock(&dytc_mutex);
+       if (dytc_capabilities & BIT(DYTC_FC_MMC)) {
+@@ -10526,8 +10536,9 @@ static void dytc_profile_refresh(void)
+       if (err)
+               return;
++      funcmode = (output >> DYTC_GET_FUNCTION_BIT) & 0xF;
+       perfmode = (output >> DYTC_GET_MODE_BIT) & 0xF;
+-      convert_dytc_to_profile(perfmode, &profile);
++      convert_dytc_to_profile(funcmode, perfmode, &profile);
+       if (profile != dytc_current_profile) {
+               dytc_current_profile = profile;
+               platform_profile_notify();
index 560118415cfb324ca39b3d10d16cc7a2c88cff09..4a9419fb78c6b11035c2961ae8b0b792060192c3 100644 (file)
@@ -35,3 +35,38 @@ drm-amd-pm-correct-the-reference-clock-for-fan-speed-rpm-calculation.patch
 drm-amd-pm-add-the-missing-mapping-for-ppt-feature-on-smu13.0.0-and-13.0.7.patch
 drm-amd-display-move-remaining-fpu-code-to-dml-folder.patch
 revert-drm-amdgpu-revert-drm-amdgpu-getting-fan-speed-pwm-for-vega10-properly.patch
+cifs-fix-uninitialized-memory-read-for-smb311-posix-symlink-create.patch
+cifs-fix-file-info-setting-in-cifs_query_path_info.patch
+cifs-fix-file-info-setting-in-cifs_open_file.patch
+cifs-do-not-query-ifaces-on-smb1-mounts.patch
+cifs-fix-double-free-on-failed-kerberos-auth.patch
+io_uring-fdinfo-include-locked-hash-table-in-fdinfo-output.patch
+asoc-rt9120-make-dev-pm-runtime-bind-asoc-component-pm.patch
+acpi-video-allow-selecting-nvidia-wmi-ec-or-apple-gmux-backlight-from-the-cmdline.patch
+platform-x86-dell-privacy-only-register-sw_camera_lens_cover-if-present.patch
+platform-surface-aggregator-ignore-command-messages-not-intended-for-us.patch
+platform-x86-int3472-discrete-ensure-the-clk-power-enable-pins-are-in-output-mode.patch
+platform-x86-thinkpad_acpi-fix-profile-mode-display-in-amt-mode.patch
+platform-x86-asus-wmi-don-t-load-fan-curves-without-fan.patch
+platform-x86-dell-privacy-fix-sw_camera_lens_cover-reporting.patch
+dt-bindings-msm-dsi-controller-main-fix-operating-points-v2-constraint.patch
+drm-msm-another-fix-for-the-headless-adreno-gpu.patch
+firmware-psci-fix-mem_protect_range-function-numbers.patch
+firmware-psci-don-t-register-with-debugfs-if-psci-isn-t-available.patch
+drm-msm-adreno-make-adreno-quirks-not-overwrite-each-other.patch
+arm64-signal-always-allocate-sve-signal-frames-on-sme-only-systems.patch
+dt-bindings-msm-dsi-controller-main-fix-power-domain-constraint.patch
+dt-bindings-msm-dsi-controller-main-fix-description-of-core-clock.patch
+arm64-signal-always-accept-sve-signal-frames-on-sme-only-systems.patch
+arm64-mm-add-pud_user_exec-check-in-pud_user_accessible_page.patch
+dt-bindings-msm-dsi-phy-28nm-add-missing-qcom-dsi-phy-regulator-ldo-mode.patch
+arm64-ptrace-use-arm64_sme-to-guard-the-sme-register-enumerations.patch
+arm64-mm-fix-incorrect-file_map_count-for-invalid-pmd.patch
+platform-x86-ideapad-laptop-add-legion-5-15arh05-dmi-id-to-set_fn_lock_led_list.patch
+drm-msm-dp-do-not-complete-dp_aux_cmd_fifo_tx-if-irq-is-not-for-aux-transfer.patch
+dt-bindings-msm-dsi-don-t-require-vdds-supply-on-10nm-phy.patch
+dt-bindings-msm-dsi-don-t-require-vcca-supply-on-14nm-phy.patch
+platform-x86-sony-laptop-don-t-turn-off-0x153-keyboard-backlight-during-probe.patch
+ixgbe-fix-pci-device-refcount-leak.patch
+ipv6-raw-deduct-extension-header-length-in-rawv6_push_pending_frames.patch
+iavf-iavf_main-actually-log-src-mask-when-talking-about-it.patch