diff --git a/blacklist.conf b/blacklist.conf index 7e6bb99..d97c275 100644 --- a/blacklist.conf +++ b/blacklist.conf @@ -407,3 +407,10 @@ fb7e76ea3f3b6238dda2f19a4212052d2caf00aa # there is no mlx5e_tc_act_parse_state b1190d5175acb2c9feea69871737274eb6f462ff # comment spelling fix 8fe4ce5836e932f5766317cb651c1ff2a4cd0506 # changes Scsi_Host, difficult to mitigate the kABI changes 26ae150bbb6d19767f10800e17ad0fd81f3da67e # ASoC:cs35l41: RUNTIME_PM_OPS() not defined yet in SLE15-SP4 +00da0cb385d05a89226e150a102eb49d8abb0359 # documentation +df5b035b5683d6a25f077af889fb88e09827f8bc # we don't build CONFIG_SMP=n kernels +27599aacbaefcbf2af7b06b0029459bbf682000d # break kabi: fbdev: Hot-unplug firmware fb devices on forced removal +8b766b0f8eece55155146f7628610ce54a065e0f # not required on SLE15-SP4: sysfb: Enable boot time VESA graphic mode selection +26817fb7b066b21c66cd41d75ed2137e046045be # removes required interface: Revert "fbdev: fbmem: add a helper to determine if an aperture is used by a fw fb" +8429b358975f11574f747ca8ef20d524d8247682 # not relevant in our configurations +a157802359f7451ed8046b2b6dbaca187797e062 # not relevant in our configurations diff --git a/config/arm64/default b/config/arm64/default index 36958b9..4b7c362 100644 --- a/config/arm64/default +++ b/config/arm64/default @@ -925,10 +925,6 @@ CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y # end of GCOV-based kernel profiling CONFIG_HAVE_GCC_PLUGINS=y -CONFIG_GCC_PLUGINS=y -# CONFIG_GCC_PLUGIN_CYC_COMPLEXITY is not set -# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set -# CONFIG_GCC_PLUGIN_RANDSTRUCT is not set # end of General architecture-dependent options CONFIG_RT_MUTEXES=y @@ -3897,7 +3893,6 @@ CONFIG_IWLWIFI_LEDS=y CONFIG_IWLDVM=m CONFIG_IWLMVM=m CONFIG_IWLWIFI_OPMODE_MODULAR=y -# CONFIG_IWLWIFI_BCAST_FILTERING is not set # # Debugging Options @@ -7178,6 +7173,7 @@ CONFIG_DUMMY_CONSOLE=y CONFIG_DUMMY_CONSOLE_COLUMNS=80 CONFIG_DUMMY_CONSOLE_ROWS=25 CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y # CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set @@ -11235,12 +11231,8 @@ CONFIG_LSM="integrity,apparmor" CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y CONFIG_INIT_STACK_NONE=y -# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set -# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set -# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL is not set # CONFIG_INIT_STACK_ALL_PATTERN is not set # CONFIG_INIT_STACK_ALL_ZERO is not set -# CONFIG_GCC_PLUGIN_STACKLEAK is not set # CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set # CONFIG_INIT_ON_FREE_DEFAULT_ON is not set # end of Memory initialization diff --git a/config/armv7hl/default b/config/armv7hl/default index a97946d..3d2bda3 100644 --- a/config/armv7hl/default +++ b/config/armv7hl/default @@ -699,7 +699,6 @@ CONFIG_ALIGNMENT_TRAP=y # CONFIG_PARAVIRT is not set # CONFIG_PARAVIRT_TIME_ACCOUNTING is not set # CONFIG_XEN is not set -# CONFIG_STACKPROTECTOR_PER_TASK is not set # end of Kernel Features # @@ -1017,10 +1016,6 @@ CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y # end of GCOV-based kernel profiling CONFIG_HAVE_GCC_PLUGINS=y -CONFIG_GCC_PLUGINS=y -# CONFIG_GCC_PLUGIN_CYC_COMPLEXITY is not set -# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set -# CONFIG_GCC_PLUGIN_RANDSTRUCT is not set # end of General architecture-dependent options CONFIG_RT_MUTEXES=y @@ -7161,6 +7156,7 @@ CONFIG_HDMI=y # CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y # CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set @@ -11147,9 +11143,6 @@ CONFIG_LSM="integrity,apparmor" CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y CONFIG_INIT_STACK_NONE=y -# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set -# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set -# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL is not set # CONFIG_INIT_STACK_ALL_PATTERN is not set # CONFIG_INIT_STACK_ALL_ZERO is not set # CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set diff --git a/config/ppc64le/default b/config/ppc64le/default index d072075..eb81e53 100644 --- a/config/ppc64le/default +++ b/config/ppc64le/default @@ -664,10 +664,6 @@ CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y # end of GCOV-based kernel profiling CONFIG_HAVE_GCC_PLUGINS=y -CONFIG_GCC_PLUGINS=y -# CONFIG_GCC_PLUGIN_CYC_COMPLEXITY is not set -# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set -# CONFIG_GCC_PLUGIN_RANDSTRUCT is not set # end of General architecture-dependent options CONFIG_RT_MUTEXES=y @@ -3132,7 +3128,6 @@ CONFIG_IWLWIFI_LEDS=y CONFIG_IWLDVM=m CONFIG_IWLMVM=m CONFIG_IWLWIFI_OPMODE_MODULAR=y -# CONFIG_IWLWIFI_BCAST_FILTERING is not set # # Debugging Options @@ -4537,6 +4532,7 @@ CONFIG_DUMMY_CONSOLE=y CONFIG_DUMMY_CONSOLE_COLUMNS=80 CONFIG_DUMMY_CONSOLE_ROWS=25 CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y # CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set @@ -6087,9 +6083,6 @@ CONFIG_LSM="integrity,apparmor" CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y CONFIG_INIT_STACK_NONE=y -# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set -# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set -# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL is not set # CONFIG_INIT_STACK_ALL_PATTERN is not set # CONFIG_INIT_STACK_ALL_ZERO is not set # CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set diff --git a/config/s390x/default b/config/s390x/default index 5939215..6f44208 100644 --- a/config/s390x/default +++ b/config/s390x/default @@ -526,10 +526,6 @@ CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y # end of GCOV-based kernel profiling CONFIG_HAVE_GCC_PLUGINS=y -CONFIG_GCC_PLUGINS=y -# CONFIG_GCC_PLUGIN_CYC_COMPLEXITY is not set -# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set -# CONFIG_GCC_PLUGIN_RANDSTRUCT is not set # end of General architecture-dependent options CONFIG_RT_MUTEXES=y @@ -2889,6 +2885,7 @@ CONFIG_DUMMY_CONSOLE=y CONFIG_DUMMY_CONSOLE_COLUMNS=80 CONFIG_DUMMY_CONSOLE_ROWS=25 CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y # end of Console display driver support @@ -3699,9 +3696,6 @@ CONFIG_LSM="integrity,apparmor" CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y CONFIG_INIT_STACK_NONE=y -# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set -# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set -# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL is not set # CONFIG_INIT_STACK_ALL_PATTERN is not set # CONFIG_INIT_STACK_ALL_ZERO is not set # CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set diff --git a/config/s390x/zfcpdump b/config/s390x/zfcpdump index d862ddd..8c8e7e4 100644 --- a/config/s390x/zfcpdump +++ b/config/s390x/zfcpdump @@ -451,9 +451,6 @@ CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y # end of GCOV-based kernel profiling CONFIG_HAVE_GCC_PLUGINS=y -CONFIG_GCC_PLUGINS=y -# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set -# CONFIG_GCC_PLUGIN_RANDSTRUCT is not set # end of General architecture-dependent options CONFIG_RT_MUTEXES=y @@ -1261,9 +1258,6 @@ CONFIG_LSM="" CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y CONFIG_INIT_STACK_NONE=y -# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set -# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set -# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL is not set # CONFIG_INIT_STACK_ALL_PATTERN is not set # CONFIG_INIT_STACK_ALL_ZERO is not set # CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set diff --git a/config/x86_64/default b/config/x86_64/default index a76db11..d7b787a 100644 --- a/config/x86_64/default +++ b/config/x86_64/default @@ -925,10 +925,6 @@ CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y # end of GCOV-based kernel profiling CONFIG_HAVE_GCC_PLUGINS=y -CONFIG_GCC_PLUGINS=y -# CONFIG_GCC_PLUGIN_CYC_COMPLEXITY is not set -# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set -# CONFIG_GCC_PLUGIN_RANDSTRUCT is not set # end of General architecture-dependent options CONFIG_RT_MUTEXES=y @@ -3740,7 +3736,6 @@ CONFIG_IWLWIFI_LEDS=y CONFIG_IWLDVM=m CONFIG_IWLMVM=m CONFIG_IWLWIFI_OPMODE_MODULAR=y -# CONFIG_IWLWIFI_BCAST_FILTERING is not set # # Debugging Options @@ -6462,6 +6457,7 @@ CONFIG_DUMMY_CONSOLE=y CONFIG_DUMMY_CONSOLE_COLUMNS=80 CONFIG_DUMMY_CONSOLE_ROWS=25 CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y # CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set @@ -9740,12 +9736,8 @@ CONFIG_LSM="integrity,apparmor" CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y CONFIG_INIT_STACK_NONE=y -# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set -# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set -# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL is not set # CONFIG_INIT_STACK_ALL_PATTERN is not set # CONFIG_INIT_STACK_ALL_ZERO is not set -# CONFIG_GCC_PLUGIN_STACKLEAK is not set # CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set # CONFIG_INIT_ON_FREE_DEFAULT_ON is not set # end of Memory initialization diff --git a/patches.suse/0001-parisc-sticon-fix-reverse-colors.patch b/patches.suse/0001-parisc-sticon-fix-reverse-colors.patch new file mode 100644 index 0000000..9e29d27 --- /dev/null +++ b/patches.suse/0001-parisc-sticon-fix-reverse-colors.patch @@ -0,0 +1,49 @@ +From bec05f33ebc1006899c6d3e59a00c58881fe7626 Mon Sep 17 00:00:00 2001 +From: Sven Schnelle +Date: Sun, 14 Nov 2021 17:08:17 +0100 +Subject: parisc/sticon: fix reverse colors +Git-commit: bec05f33ebc1006899c6d3e59a00c58881fe7626 +Patch-mainline: v5.16-rc2 +References: bsc#1152489 + +sticon_build_attr() checked the reverse argument and flipped +background and foreground color, but returned the non-reverse +value afterwards. Fix this and also add two local variables +for foreground and background color to make the code easier +to read. + +Signed-off-by: Sven Schnelle +Cc: +Signed-off-by: Helge Deller +Acked-by: Thomas Zimmermann +--- + drivers/video/console/sticon.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c +index 1b451165311c..40496e9e9b43 100644 +--- a/drivers/video/console/sticon.c ++++ b/drivers/video/console/sticon.c +@@ -332,13 +332,13 @@ static u8 sticon_build_attr(struct vc_data *conp, u8 color, + bool blink, bool underline, bool reverse, + bool italic) + { +- u8 attr = ((color & 0x70) >> 1) | ((color & 7)); ++ u8 fg = color & 7; ++ u8 bg = (color & 0x70) >> 4; + +- if (reverse) { +- color = ((color >> 3) & 0x7) | ((color & 0x7) << 3); +- } +- +- return attr; ++ if (reverse) ++ return (fg << 3) | bg; ++ else ++ return (bg << 3) | fg; + } + + static void sticon_invert_region(struct vc_data *conp, u16 *p, int count) +-- +2.37.3 + diff --git a/patches.suse/0002-fbcon-Add-option-to-enable-legacy-hardware-accelerat.patch b/patches.suse/0002-fbcon-Add-option-to-enable-legacy-hardware-accelerat.patch new file mode 100644 index 0000000..cbfac91 --- /dev/null +++ b/patches.suse/0002-fbcon-Add-option-to-enable-legacy-hardware-accelerat.patch @@ -0,0 +1,389 @@ +From a3f781a9d6114c1d1e01defb7aa234dec45d2a5f Mon Sep 17 00:00:00 2001 +From: Helge Deller +Date: Wed, 2 Feb 2022 14:55:31 +0100 +Subject: fbcon: Add option to enable legacy hardware acceleration +Git-commit: a3f781a9d6114c1d1e01defb7aa234dec45d2a5f +Patch-mainline: v5.17-rc3 +References: bsc#1152472 + +Add a config option CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION to +enable bitblt and fillrect hardware acceleration in the framebuffer +console. If disabled, such acceleration will not be used, even if it is +supported by the graphics hardware driver. + +If you plan to use DRM as your main graphics output system, you should +disable this option since it will prevent compiling in code which isn't +used later on when DRM takes over. + +For all other configurations, e.g. if none of your graphic cards support +DRM (yet), DRM isn't available for your architecture, or you can't be +sure that the graphic card in the target system will support DRM, you +most likely want to enable this option. + +In the non-accelerated case (e.g. when DRM is used), the inlined +fb_scrollmode() function is hardcoded to return SCROLL_REDRAW and as such the +compiler is able to optimize much unneccesary code away. + +In this v3 patch version I additionally changed the GETVYRES() and GETVXRES() +macros to take a pointer to the fbcon_display struct. This fixes the build when +console rotation is enabled and helps the compiler again to optimize out code. + +Signed-off-by: Helge Deller +Cc: stable@vger.kernel.org # v5.10+ +Signed-off-by: Helge Deller +Signed-off-by: Daniel Vetter +Link: https://patchwork.freedesktop.org/patch/msgid/20220202135531.92183-4-deller@gmx.de +Acked-by: Thomas Zimmermann +--- + drivers/video/console/Kconfig | 20 +++++++++++++ + drivers/video/fbdev/core/fbcon.c | 39 ++++++++++++++++++------- + drivers/video/fbdev/core/fbcon.h | 15 +++++++++- + drivers/video/fbdev/core/fbcon_ccw.c | 10 +++---- + drivers/video/fbdev/core/fbcon_cw.c | 10 +++---- + drivers/video/fbdev/core/fbcon_rotate.h | 4 +-- + drivers/video/fbdev/core/fbcon_ud.c | 20 ++++++------- + 7 files changed, 84 insertions(+), 34 deletions(-) + +diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig +index 840d9813b0bc..fcc46380e7c9 100644 +--- a/drivers/video/console/Kconfig ++++ b/drivers/video/console/Kconfig +@@ -78,6 +78,26 @@ config FRAMEBUFFER_CONSOLE + help + Low-level framebuffer-based console driver. + ++config FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION ++ bool "Enable legacy fbcon hardware acceleration code" ++ depends on FRAMEBUFFER_CONSOLE ++ default y if PARISC ++ default n ++ help ++ This option enables the fbcon (framebuffer text-based) hardware ++ acceleration for graphics drivers which were written for the fbdev ++ graphics interface. ++ ++ On modern machines, on mainstream machines (like x86-64) or when ++ using a modern Linux distribution those fbdev drivers usually aren't used. ++ So enabling this option wouldn't have any effect, which is why you want ++ to disable this option on such newer machines. ++ ++ If you compile this kernel for older machines which still require the ++ fbdev drivers, you may want to say Y. ++ ++ If unsure, select n. ++ + config FRAMEBUFFER_CONSOLE_DETECT_PRIMARY + bool "Map the console to the primary display device" + depends on FRAMEBUFFER_CONSOLE +diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c +index 0cc2a36b674a..f36829eeb5a9 100644 +--- a/drivers/video/fbdev/core/fbcon.c ++++ b/drivers/video/fbdev/core/fbcon.c +@@ -1136,11 +1136,13 @@ static void fbcon_init(struct vc_data *vc, int init) + + ops->graphics = 0; + ++#ifdef CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION + if ((cap & FBINFO_HWACCEL_COPYAREA) && + !(cap & FBINFO_HWACCEL_DISABLED)) + p->scrollmode = SCROLL_MOVE; + else /* default to something safe */ + p->scrollmode = SCROLL_REDRAW; ++#endif + + /* + * ++guenther: console.c:vc_allocate() relies on initializing +@@ -1705,7 +1707,7 @@ static bool fbcon_scroll(struct vc_data *vc, unsigned int t, unsigned int b, + count = vc->vc_rows; + if (logo_shown >= 0) + goto redraw_up; +- switch (p->scrollmode) { ++ switch (fb_scrollmode(p)) { + case SCROLL_MOVE: + fbcon_redraw_blit(vc, info, p, t, b - t - count, + count); +@@ -1795,7 +1797,7 @@ static bool fbcon_scroll(struct vc_data *vc, unsigned int t, unsigned int b, + count = vc->vc_rows; + if (logo_shown >= 0) + goto redraw_down; +- switch (p->scrollmode) { ++ switch (fb_scrollmode(p)) { + case SCROLL_MOVE: + fbcon_redraw_blit(vc, info, p, b - 1, b - t - count, + -count); +@@ -1946,12 +1948,12 @@ static void fbcon_bmove_rec(struct vc_data *vc, struct fbcon_display *p, int sy, + height, width); + } + +-static void updatescrollmode(struct fbcon_display *p, ++static void updatescrollmode_accel(struct fbcon_display *p, + struct fb_info *info, + struct vc_data *vc) + { ++#ifdef CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION + struct fbcon_ops *ops = info->fbcon_par; +- int fh = vc->vc_font.height; + int cap = info->flags; + u16 t = 0; + int ypan = FBCON_SWAP(ops->rotate, info->fix.ypanstep, +@@ -1972,12 +1974,6 @@ static void updatescrollmode(struct fbcon_display *p, + int fast_imageblit = (cap & FBINFO_HWACCEL_IMAGEBLIT) && + !(cap & FBINFO_HWACCEL_DISABLED); + +- p->vrows = vyres/fh; +- if (yres > (fh * (vc->vc_rows + 1))) +- p->vrows -= (yres - (fh * vc->vc_rows)) / fh; +- if ((yres % fh) && (vyres % fh < yres % fh)) +- p->vrows--; +- + if (good_wrap || good_pan) { + if (reading_fast || fast_copyarea) + p->scrollmode = good_wrap ? +@@ -1991,6 +1987,27 @@ static void updatescrollmode(struct fbcon_display *p, + else + p->scrollmode = SCROLL_REDRAW; + } ++#endif ++} ++ ++static void updatescrollmode(struct fbcon_display *p, ++ struct fb_info *info, ++ struct vc_data *vc) ++{ ++ struct fbcon_ops *ops = info->fbcon_par; ++ int fh = vc->vc_font.height; ++ int yres = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres); ++ int vyres = FBCON_SWAP(ops->rotate, info->var.yres_virtual, ++ info->var.xres_virtual); ++ ++ p->vrows = vyres/fh; ++ if (yres > (fh * (vc->vc_rows + 1))) ++ p->vrows -= (yres - (fh * vc->vc_rows)) / fh; ++ if ((yres % fh) && (vyres % fh < yres % fh)) ++ p->vrows--; ++ ++ /* update scrollmode in case hardware acceleration is used */ ++ updatescrollmode_accel(p, info, vc); + } + + #define PITCH(w) (((w) + 7) >> 3) +@@ -2148,7 +2165,7 @@ static int fbcon_switch(struct vc_data *vc) + + updatescrollmode(p, info, vc); + +- switch (p->scrollmode) { ++ switch (fb_scrollmode(p)) { + case SCROLL_WRAP_MOVE: + scrollback_phys_max = p->vrows - vc->vc_rows; + break; +diff --git a/drivers/video/fbdev/core/fbcon.h b/drivers/video/fbdev/core/fbcon.h +index 5246d0f2574b..969d41ecede5 100644 +--- a/drivers/video/fbdev/core/fbcon.h ++++ b/drivers/video/fbdev/core/fbcon.h +@@ -29,7 +29,9 @@ struct fbcon_display { + /* Filled in by the low-level console driver */ + const u_char *fontdata; + int userfont; /* != 0 if fontdata kmalloc()ed */ +- u_short scrollmode; /* Scroll Method */ ++#ifdef CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION ++ u_short scrollmode; /* Scroll Method, use fb_scrollmode() */ ++#endif + u_short inverse; /* != 0 text black on white as default */ + short yscroll; /* Hardware scrolling */ + int vrows; /* number of virtual rows */ +@@ -208,6 +210,17 @@ static inline int attr_col_ec(int shift, struct vc_data *vc, + #define SCROLL_REDRAW 0x004 + #define SCROLL_PAN_REDRAW 0x005 + ++static inline u_short fb_scrollmode(struct fbcon_display *fb) ++{ ++#ifdef CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION ++ return fb->scrollmode; ++#else ++ /* hardcoded to SCROLL_REDRAW if acceleration was disabled. */ ++ return SCROLL_REDRAW; ++#endif ++} ++ ++ + #ifdef CONFIG_FB_TILEBLITTING + extern void fbcon_set_tileops(struct vc_data *vc, struct fb_info *info); + #endif +diff --git a/drivers/video/fbdev/core/fbcon_ccw.c b/drivers/video/fbdev/core/fbcon_ccw.c +index 9cd2c4b05c32..2789ace79634 100644 +--- a/drivers/video/fbdev/core/fbcon_ccw.c ++++ b/drivers/video/fbdev/core/fbcon_ccw.c +@@ -65,7 +65,7 @@ static void ccw_bmove(struct vc_data *vc, struct fb_info *info, int sy, + { + struct fbcon_ops *ops = info->fbcon_par; + struct fb_copyarea area; +- u32 vyres = GETVYRES(ops->p->scrollmode, info); ++ u32 vyres = GETVYRES(ops->p, info); + + area.sx = sy * vc->vc_font.height; + area.sy = vyres - ((sx + width) * vc->vc_font.width); +@@ -83,7 +83,7 @@ static void ccw_clear(struct vc_data *vc, struct fb_info *info, int sy, + struct fbcon_ops *ops = info->fbcon_par; + struct fb_fillrect region; + int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; +- u32 vyres = GETVYRES(ops->p->scrollmode, info); ++ u32 vyres = GETVYRES(ops->p, info); + + region.color = attr_bgcol_ec(bgshift,vc,info); + region.dx = sy * vc->vc_font.height; +@@ -140,7 +140,7 @@ static void ccw_putcs(struct vc_data *vc, struct fb_info *info, + u32 cnt, pitch, size; + u32 attribute = get_attribute(info, scr_readw(s)); + u8 *dst, *buf = NULL; +- u32 vyres = GETVYRES(ops->p->scrollmode, info); ++ u32 vyres = GETVYRES(ops->p, info); + + if (!ops->fontbuffer) + return; +@@ -229,7 +229,7 @@ static void ccw_cursor(struct vc_data *vc, struct fb_info *info, int mode, + int attribute, use_sw = vc->vc_cursor_type & CUR_SW; + int err = 1, dx, dy; + char *src; +- u32 vyres = GETVYRES(ops->p->scrollmode, info); ++ u32 vyres = GETVYRES(ops->p, info); + + if (!ops->fontbuffer) + return; +@@ -387,7 +387,7 @@ static int ccw_update_start(struct fb_info *info) + { + struct fbcon_ops *ops = info->fbcon_par; + u32 yoffset; +- u32 vyres = GETVYRES(ops->p->scrollmode, info); ++ u32 vyres = GETVYRES(ops->p, info); + int err; + + yoffset = (vyres - info->var.yres) - ops->var.xoffset; +diff --git a/drivers/video/fbdev/core/fbcon_cw.c b/drivers/video/fbdev/core/fbcon_cw.c +index 88d89fad3f05..86a254c1b2b7 100644 +--- a/drivers/video/fbdev/core/fbcon_cw.c ++++ b/drivers/video/fbdev/core/fbcon_cw.c +@@ -50,7 +50,7 @@ static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy, + { + struct fbcon_ops *ops = info->fbcon_par; + struct fb_copyarea area; +- u32 vxres = GETVXRES(ops->p->scrollmode, info); ++ u32 vxres = GETVXRES(ops->p, info); + + area.sx = vxres - ((sy + height) * vc->vc_font.height); + area.sy = sx * vc->vc_font.width; +@@ -68,7 +68,7 @@ static void cw_clear(struct vc_data *vc, struct fb_info *info, int sy, + struct fbcon_ops *ops = info->fbcon_par; + struct fb_fillrect region; + int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; +- u32 vxres = GETVXRES(ops->p->scrollmode, info); ++ u32 vxres = GETVXRES(ops->p, info); + + region.color = attr_bgcol_ec(bgshift,vc,info); + region.dx = vxres - ((sy + height) * vc->vc_font.height); +@@ -125,7 +125,7 @@ static void cw_putcs(struct vc_data *vc, struct fb_info *info, + u32 cnt, pitch, size; + u32 attribute = get_attribute(info, scr_readw(s)); + u8 *dst, *buf = NULL; +- u32 vxres = GETVXRES(ops->p->scrollmode, info); ++ u32 vxres = GETVXRES(ops->p, info); + + if (!ops->fontbuffer) + return; +@@ -212,7 +212,7 @@ static void cw_cursor(struct vc_data *vc, struct fb_info *info, int mode, + int attribute, use_sw = vc->vc_cursor_type & CUR_SW; + int err = 1, dx, dy; + char *src; +- u32 vxres = GETVXRES(ops->p->scrollmode, info); ++ u32 vxres = GETVXRES(ops->p, info); + + if (!ops->fontbuffer) + return; +@@ -369,7 +369,7 @@ static void cw_cursor(struct vc_data *vc, struct fb_info *info, int mode, + static int cw_update_start(struct fb_info *info) + { + struct fbcon_ops *ops = info->fbcon_par; +- u32 vxres = GETVXRES(ops->p->scrollmode, info); ++ u32 vxres = GETVXRES(ops->p, info); + u32 xoffset; + int err; + +diff --git a/drivers/video/fbdev/core/fbcon_rotate.h b/drivers/video/fbdev/core/fbcon_rotate.h +index e233444cda66..01cbe303b8a2 100644 +--- a/drivers/video/fbdev/core/fbcon_rotate.h ++++ b/drivers/video/fbdev/core/fbcon_rotate.h +@@ -12,11 +12,11 @@ + #define _FBCON_ROTATE_H + + #define GETVYRES(s,i) ({ \ +- (s == SCROLL_REDRAW || s == SCROLL_MOVE) ? \ ++ (fb_scrollmode(s) == SCROLL_REDRAW || fb_scrollmode(s) == SCROLL_MOVE) ? \ + (i)->var.yres : (i)->var.yres_virtual; }) + + #define GETVXRES(s,i) ({ \ +- (s == SCROLL_REDRAW || s == SCROLL_MOVE || !(i)->fix.xpanstep) ? \ ++ (fb_scrollmode(s) == SCROLL_REDRAW || fb_scrollmode(s) == SCROLL_MOVE || !(i)->fix.xpanstep) ? \ + (i)->var.xres : (i)->var.xres_virtual; }) + + +diff --git a/drivers/video/fbdev/core/fbcon_ud.c b/drivers/video/fbdev/core/fbcon_ud.c +index 8d5e66b1bdfb..23bc045769d0 100644 +--- a/drivers/video/fbdev/core/fbcon_ud.c ++++ b/drivers/video/fbdev/core/fbcon_ud.c +@@ -50,8 +50,8 @@ static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy, + { + struct fbcon_ops *ops = info->fbcon_par; + struct fb_copyarea area; +- u32 vyres = GETVYRES(ops->p->scrollmode, info); +- u32 vxres = GETVXRES(ops->p->scrollmode, info); ++ u32 vyres = GETVYRES(ops->p, info); ++ u32 vxres = GETVXRES(ops->p, info); + + area.sy = vyres - ((sy + height) * vc->vc_font.height); + area.sx = vxres - ((sx + width) * vc->vc_font.width); +@@ -69,8 +69,8 @@ static void ud_clear(struct vc_data *vc, struct fb_info *info, int sy, + struct fbcon_ops *ops = info->fbcon_par; + struct fb_fillrect region; + int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; +- u32 vyres = GETVYRES(ops->p->scrollmode, info); +- u32 vxres = GETVXRES(ops->p->scrollmode, info); ++ u32 vyres = GETVYRES(ops->p, info); ++ u32 vxres = GETVXRES(ops->p, info); + + region.color = attr_bgcol_ec(bgshift,vc,info); + region.dy = vyres - ((sy + height) * vc->vc_font.height); +@@ -162,8 +162,8 @@ static void ud_putcs(struct vc_data *vc, struct fb_info *info, + u32 mod = vc->vc_font.width % 8, cnt, pitch, size; + u32 attribute = get_attribute(info, scr_readw(s)); + u8 *dst, *buf = NULL; +- u32 vyres = GETVYRES(ops->p->scrollmode, info); +- u32 vxres = GETVXRES(ops->p->scrollmode, info); ++ u32 vyres = GETVYRES(ops->p, info); ++ u32 vxres = GETVXRES(ops->p, info); + + if (!ops->fontbuffer) + return; +@@ -259,8 +259,8 @@ static void ud_cursor(struct vc_data *vc, struct fb_info *info, int mode, + int attribute, use_sw = vc->vc_cursor_type & CUR_SW; + int err = 1, dx, dy; + char *src; +- u32 vyres = GETVYRES(ops->p->scrollmode, info); +- u32 vxres = GETVXRES(ops->p->scrollmode, info); ++ u32 vyres = GETVYRES(ops->p, info); ++ u32 vxres = GETVXRES(ops->p, info); + + if (!ops->fontbuffer) + return; +@@ -410,8 +410,8 @@ static int ud_update_start(struct fb_info *info) + { + struct fbcon_ops *ops = info->fbcon_par; + int xoffset, yoffset; +- u32 vyres = GETVYRES(ops->p->scrollmode, info); +- u32 vxres = GETVXRES(ops->p->scrollmode, info); ++ u32 vyres = GETVYRES(ops->p, info); ++ u32 vxres = GETVXRES(ops->p, info); + int err; + + xoffset = vxres - info->var.xres - ops->var.xoffset; +-- +2.37.3 + diff --git a/patches.suse/0004-fbcon-Avoid-cap-set-but-not-used-warning.patch b/patches.suse/0004-fbcon-Avoid-cap-set-but-not-used-warning.patch index bc13ff1..0a05c44 100644 --- a/patches.suse/0004-fbcon-Avoid-cap-set-but-not-used-warning.patch +++ b/patches.suse/0004-fbcon-Avoid-cap-set-but-not-used-warning.patch @@ -43,10 +43,10 @@ Acked-by: Thomas Zimmermann if (logo_shown < 0 && console_loglevel <= CONSOLE_LOGLEVEL_QUIET) logo_shown = FBCON_LOGO_DONTSHOW; -@@ -1136,8 +1135,8 @@ static void fbcon_init(struct vc_data *v - +@@ -1137,8 +1136,8 @@ static void fbcon_init(struct vc_data *v ops->graphics = 0; + #ifdef CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION - if ((cap & FBINFO_HWACCEL_COPYAREA) && - !(cap & FBINFO_HWACCEL_DISABLED)) + if ((info->flags & FBINFO_HWACCEL_COPYAREA) && diff --git a/patches.suse/0006-parisc-stifb-Implement-fb_is_primary_device.patch b/patches.suse/0006-parisc-stifb-Implement-fb_is_primary_device.patch new file mode 100644 index 0000000..a7fa753 --- /dev/null +++ b/patches.suse/0006-parisc-stifb-Implement-fb_is_primary_device.patch @@ -0,0 +1,95 @@ +From cf936af790a3ef5f41ff687ec91bfbffee141278 Mon Sep 17 00:00:00 2001 +From: Helge Deller +Date: Thu, 2 Jun 2022 13:50:44 +0200 +Subject: parisc/stifb: Implement fb_is_primary_device() +Git-commit: cf936af790a3ef5f41ff687ec91bfbffee141278 +Patch-mainline: v5.19-rc1 +References: bsc#1152489 + +Implement fb_is_primary_device() function, so that fbcon detects if this +framebuffer belongs to the default graphics card which was used to start +the system. + +Signed-off-by: Helge Deller +Cc: stable@vger.kernel.org # v5.10+ +Acked-by: Thomas Zimmermann +--- + arch/parisc/include/asm/fb.h | 4 ++++ + drivers/video/console/sticore.c | 17 +++++++++++++++++ + drivers/video/fbdev/stifb.c | 4 ++-- + 3 files changed, 23 insertions(+), 2 deletions(-) + +diff --git a/arch/parisc/include/asm/fb.h b/arch/parisc/include/asm/fb.h +index c4cd6360f996..d63a2acb91f2 100644 +--- a/arch/parisc/include/asm/fb.h ++++ b/arch/parisc/include/asm/fb.h +@@ -12,9 +12,13 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE; + } + ++#if defined(CONFIG_STI_CONSOLE) || defined(CONFIG_FB_STI) ++int fb_is_primary_device(struct fb_info *info); ++#else + static inline int fb_is_primary_device(struct fb_info *info) + { + return 0; + } ++#endif + + #endif /* _ASM_FB_H_ */ +diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c +index f869b723494f..62005064911b 100644 +--- a/drivers/video/console/sticore.c ++++ b/drivers/video/console/sticore.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + #include "../fbdev/sticore.h" + +@@ -1127,6 +1128,22 @@ int sti_call(const struct sti_struct *sti, unsigned long func, + return ret; + } + ++/* check if given fb_info is the primary device */ ++int fb_is_primary_device(struct fb_info *info) ++{ ++ struct sti_struct *sti; ++ ++ sti = sti_get_rom(0); ++ ++ /* if no built-in graphics card found, allow any fb driver as default */ ++ if (!sti) ++ return true; ++ ++ /* return true if it's the default built-in framebuffer driver */ ++ return (sti->info == info); ++} ++EXPORT_SYMBOL(fb_is_primary_device); ++ + MODULE_AUTHOR("Philipp Rumpf, Helge Deller, Thomas Bogendoerfer"); + MODULE_DESCRIPTION("Core STI driver for HP's NGLE series graphics cards in HP PARISC machines"); + MODULE_LICENSE("GPL v2"); +diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c +index bebb2eea6448..38a861e22c33 100644 +--- a/drivers/video/fbdev/stifb.c ++++ b/drivers/video/fbdev/stifb.c +@@ -1358,11 +1358,11 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) + goto out_err3; + } + ++ /* save for primary gfx device detection & unregister_framebuffer() */ ++ sti->info = info; + if (register_framebuffer(&fb->info) < 0) + goto out_err4; + +- sti->info = info; /* save for unregister_framebuffer() */ +- + fb_info(&fb->info, "%s %dx%d-%d frame buffer device, %s, id: %04x, mmio: 0x%04lx\n", + fix->id, + var->xres, +-- +2.37.3 + diff --git a/patches.suse/0007-parisc-stifb-Keep-track-of-hardware-path-of-graphics.patch b/patches.suse/0007-parisc-stifb-Keep-track-of-hardware-path-of-graphics.patch new file mode 100644 index 0000000..82ab27d --- /dev/null +++ b/patches.suse/0007-parisc-stifb-Keep-track-of-hardware-path-of-graphics.patch @@ -0,0 +1,121 @@ +From b046f984814af7985f444150ec28716d42d00d9a Mon Sep 17 00:00:00 2001 +From: Helge Deller +Date: Thu, 2 Jun 2022 13:55:26 +0200 +Subject: parisc/stifb: Keep track of hardware path of graphics card +Git-commit: b046f984814af7985f444150ec28716d42d00d9a +Patch-mainline: v5.19-rc1 +References: bsc#1152489 + +Keep the pa_path (hardware path) of the graphics card in sti_struct and use +this info to give more useful info which card is currently being used. + +Signed-off-by: Helge Deller +Cc: stable@vger.kernel.org # v5.10+ +Acked-by: Thomas Zimmermann +--- + drivers/video/console/sticon.c | 5 ++++- + drivers/video/console/sticore.c | 15 +++++++-------- + drivers/video/fbdev/sticore.h | 3 +++ + 3 files changed, 14 insertions(+), 9 deletions(-) + +diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c +index 40496e9e9b43..f304163e87e9 100644 +--- a/drivers/video/console/sticon.c ++++ b/drivers/video/console/sticon.c +@@ -46,6 +46,7 @@ + #include + #include + #include ++#include + + #include + +@@ -392,7 +393,9 @@ static int __init sticonsole_init(void) + for (i = 0; i < MAX_NR_CONSOLES; i++) + font_data[i] = STI_DEF_FONT; + +- pr_info("sticon: Initializing STI text console.\n"); ++ pr_info("sticon: Initializing STI text console on %s at [%s]\n", ++ sticon_sti->sti_data->inq_outptr.dev_name, ++ sticon_sti->pa_path); + console_lock(); + err = do_take_over_console(&sti_con, 0, MAX_NR_CONSOLES - 1, + PAGE0->mem_cons.cl_class != CL_DUPLEX); +diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c +index 62005064911b..6a947ff96d6e 100644 +--- a/drivers/video/console/sticore.c ++++ b/drivers/video/console/sticore.c +@@ -34,7 +34,7 @@ + + #include "../fbdev/sticore.h" + +-#define STI_DRIVERVERSION "Version 0.9b" ++#define STI_DRIVERVERSION "Version 0.9c" + + static struct sti_struct *default_sti __read_mostly; + +@@ -503,7 +503,7 @@ sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) + if (!fbfont) + return NULL; + +- pr_info("STI selected %ux%u framebuffer font %s for sticon\n", ++ pr_info(" using %ux%u framebuffer font %s\n", + fbfont->width, fbfont->height, fbfont->name); + + bpc = ((fbfont->width+7)/8) * fbfont->height; +@@ -947,6 +947,7 @@ static struct sti_struct *sti_try_rom_generic(unsigned long address, + + static void sticore_check_for_default_sti(struct sti_struct *sti, char *path) + { ++ pr_info(" located at [%s]\n", sti->pa_path); + if (strcmp (path, default_sti_path) == 0) + default_sti = sti; + } +@@ -958,7 +959,6 @@ static void sticore_check_for_default_sti(struct sti_struct *sti, char *path) + */ + static int __init sticore_pa_init(struct parisc_device *dev) + { +- char pa_path[21]; + struct sti_struct *sti = NULL; + int hpa = dev->hpa.start; + +@@ -971,8 +971,8 @@ static int __init sticore_pa_init(struct parisc_device *dev) + if (!sti) + return 1; + +- print_pa_hwpath(dev, pa_path); +- sticore_check_for_default_sti(sti, pa_path); ++ print_pa_hwpath(dev, sti->pa_path); ++ sticore_check_for_default_sti(sti, sti->pa_path); + return 0; + } + +@@ -1008,9 +1008,8 @@ static int sticore_pci_init(struct pci_dev *pd, const struct pci_device_id *ent) + + sti = sti_try_rom_generic(rom_base, fb_base, pd); + if (sti) { +- char pa_path[30]; +- print_pci_hwpath(pd, pa_path); +- sticore_check_for_default_sti(sti, pa_path); ++ print_pci_hwpath(pd, sti->pa_path); ++ sticore_check_for_default_sti(sti, sti->pa_path); + } + + if (!sti) { +diff --git a/drivers/video/fbdev/sticore.h b/drivers/video/fbdev/sticore.h +index c338f7848ae2..0ebdd28a0b81 100644 +--- a/drivers/video/fbdev/sticore.h ++++ b/drivers/video/fbdev/sticore.h +@@ -370,6 +370,9 @@ struct sti_struct { + + /* pointer to all internal data */ + struct sti_all_data *sti_data; ++ ++ /* pa_path of this device */ ++ char pa_path[24]; + }; + + +-- +2.37.3 + diff --git a/patches.suse/0008-parisc-stifb-Fix-fb_is_primary_device-only-available.patch b/patches.suse/0008-parisc-stifb-Fix-fb_is_primary_device-only-available.patch new file mode 100644 index 0000000..0d77d0b --- /dev/null +++ b/patches.suse/0008-parisc-stifb-Fix-fb_is_primary_device-only-available.patch @@ -0,0 +1,59 @@ +From 1d0811b03eb30b2f0793acaa96c6ce90b8b9c87a Mon Sep 17 00:00:00 2001 +From: Helge Deller +Date: Tue, 7 Jun 2022 12:57:58 +0200 +Subject: parisc/stifb: Fix fb_is_primary_device() only available with + CONFIG_FB_STI +Git-commit: 1d0811b03eb30b2f0793acaa96c6ce90b8b9c87a +Patch-mainline: v5.19-rc4 +References: bsc#1152489 + +Fix this build error noticed by the kernel test robot: + +drivers/video/console/sticore.c:1132:5: error: redefinition of 'fb_is_primary_device' + arch/parisc/include/asm/fb.h:18:19: note: previous definition of 'fb_is_primary_device' + +Signed-off-by: Helge Deller +Reported-by: kernel test robot +Cc: stable@vger.kernel.org # v5.10+ +Acked-by: Thomas Zimmermann +--- + arch/parisc/include/asm/fb.h | 2 +- + drivers/video/console/sticore.c | 2 ++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/arch/parisc/include/asm/fb.h b/arch/parisc/include/asm/fb.h +index d63a2acb91f2..55d29c4f716e 100644 +--- a/arch/parisc/include/asm/fb.h ++++ b/arch/parisc/include/asm/fb.h +@@ -12,7 +12,7 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE; + } + +-#if defined(CONFIG_STI_CONSOLE) || defined(CONFIG_FB_STI) ++#if defined(CONFIG_FB_STI) + int fb_is_primary_device(struct fb_info *info); + #else + static inline int fb_is_primary_device(struct fb_info *info) +diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c +index fa23bf0247b0..bd4dc97d4d34 100644 +--- a/drivers/video/console/sticore.c ++++ b/drivers/video/console/sticore.c +@@ -1148,6 +1148,7 @@ int sti_call(const struct sti_struct *sti, unsigned long func, + return ret; + } + ++#if defined(CONFIG_FB_STI) + /* check if given fb_info is the primary device */ + int fb_is_primary_device(struct fb_info *info) + { +@@ -1163,6 +1164,7 @@ int fb_is_primary_device(struct fb_info *info) + return (sti->info == info); + } + EXPORT_SYMBOL(fb_is_primary_device); ++#endif + + MODULE_AUTHOR("Philipp Rumpf, Helge Deller, Thomas Bogendoerfer"); + MODULE_DESCRIPTION("Core STI driver for HP's NGLE series graphics cards in HP PARISC machines"); +-- +2.37.3 + diff --git a/patches.suse/0009-fbcon-Fix-accelerated-fbdev-scrolling-while-logo-is-.patch b/patches.suse/0009-fbcon-Fix-accelerated-fbdev-scrolling-while-logo-is-.patch new file mode 100644 index 0000000..ff13a0d --- /dev/null +++ b/patches.suse/0009-fbcon-Fix-accelerated-fbdev-scrolling-while-logo-is-.patch @@ -0,0 +1,56 @@ +From 3866cba87dcd0162fb41e9b3b653d0af68fad5ec Mon Sep 17 00:00:00 2001 +From: Helge Deller +Date: Thu, 2 Jun 2022 22:08:38 +0200 +Subject: fbcon: Fix accelerated fbdev scrolling while logo is still shown +Git-commit: 3866cba87dcd0162fb41e9b3b653d0af68fad5ec +Patch-mainline: v6.0-rc1 +References: bsc#1152472 + +There is no need to directly skip over to the SCROLL_REDRAW case while +the logo is still shown. + +When using DRM, this change has no effect because the code will reach +the SCROLL_REDRAW case immediately anyway. + +But if you run an accelerated fbdev driver and have +FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION enabled, console scrolling is +slowed down by factors so that it feels as if you use a 9600 baud +terminal. + +So, drop those unnecessary checks and speed up fbdev console +acceleration during bootup. + +Cc: stable@vger.kernel.org # v5.10+ +Acked-by: Daniel Vetter +Signed-off-by: Helge Deller +Link: https://patchwork.freedesktop.org/patch/msgid/YpkYxk7wsBPx3po+@p100 +Acked-by: Thomas Zimmermann +--- + drivers/video/fbdev/core/fbcon.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c +index d765bbdf19dc..cb8d94d7feba 100644 +--- a/drivers/video/fbdev/core/fbcon.c ++++ b/drivers/video/fbdev/core/fbcon.c +@@ -1758,8 +1758,6 @@ static bool fbcon_scroll(struct vc_data *vc, unsigned int t, unsigned int b, + case SM_UP: + if (count > vc->vc_rows) /* Maximum realistic size */ + count = vc->vc_rows; +- if (logo_shown >= 0) +- goto redraw_up; + switch (fb_scrollmode(p)) { + case SCROLL_MOVE: + fbcon_redraw_blit(vc, info, p, t, b - t - count, +@@ -1848,8 +1846,6 @@ static bool fbcon_scroll(struct vc_data *vc, unsigned int t, unsigned int b, + case SM_DOWN: + if (count > vc->vc_rows) /* Maximum realistic size */ + count = vc->vc_rows; +- if (logo_shown >= 0) +- goto redraw_down; + switch (fb_scrollmode(p)) { + case SCROLL_MOVE: + fbcon_redraw_blit(vc, info, p, b - 1, b - t - count, +-- +2.37.3 + diff --git a/patches.suse/Bluetooth-btusb-mediatek-fix-WMT-failure-during-runt.patch b/patches.suse/Bluetooth-btusb-mediatek-fix-WMT-failure-during-runt.patch new file mode 100644 index 0000000..1b0b67b --- /dev/null +++ b/patches.suse/Bluetooth-btusb-mediatek-fix-WMT-failure-during-runt.patch @@ -0,0 +1,62 @@ +From fd3f106677bac70437dc12e76c827294ed495a44 Mon Sep 17 00:00:00 2001 +From: Sean Wang +Date: Thu, 11 Aug 2022 08:49:07 +0800 +Subject: [PATCH] Bluetooth: btusb: mediatek: fix WMT failure during runtime suspend +Git-commit: fd3f106677bac70437dc12e76c827294ed495a44 +Patch-mainline: v6.1-rc1 +References: git-fixes + +WMT cmd/event doesn't follow up the generic HCI cmd/event handling, it +needs constantly polling control pipe until the host received the WMT +event, thus, we should require to specifically acquire PM counter on the +USB to prevent the interface from entering auto suspended while WMT +cmd/event in progress. + +Fixes: a1c49c434e15 ("Bluetooth: btusb: Add protocol support for MediaTek MT7668U USB devices") +Co-developed-by: Jing Cai +Signed-off-by: Jing Cai +Signed-off-by: Sean Wang +Signed-off-by: Luiz Augusto von Dentz +Acked-by: Takashi Iwai + +--- + drivers/bluetooth/btusb.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c +index 7e87139fc991..ef7726a3e701 100644 +--- a/drivers/bluetooth/btusb.c ++++ b/drivers/bluetooth/btusb.c +@@ -2482,15 +2482,29 @@ static int btusb_mtk_hci_wmt_sync(struct hci_dev *hdev, + + set_bit(BTUSB_TX_WAIT_VND_EVT, &data->flags); + ++ /* WMT cmd/event doesn't follow up the generic HCI cmd/event handling, ++ * it needs constantly polling control pipe until the host received the ++ * WMT event, thus, we should require to specifically acquire PM counter ++ * on the USB to prevent the interface from entering auto suspended ++ * while WMT cmd/event in progress. ++ */ ++ err = usb_autopm_get_interface(data->intf); ++ if (err < 0) ++ goto err_free_wc; ++ + err = __hci_cmd_send(hdev, 0xfc6f, hlen, wc); + + if (err < 0) { + clear_bit(BTUSB_TX_WAIT_VND_EVT, &data->flags); ++ usb_autopm_put_interface(data->intf); + goto err_free_wc; + } + + /* Submit control IN URB on demand to process the WMT event */ + err = btusb_mtk_submit_wmt_recv_urb(hdev); ++ ++ usb_autopm_put_interface(data->intf); ++ + if (err < 0) + goto err_free_wc; + +-- +2.35.3 + diff --git a/patches.suse/Bluetooth-hci_-ldisc-serdev-check-percpu_init_rwsem-.patch b/patches.suse/Bluetooth-hci_-ldisc-serdev-check-percpu_init_rwsem-.patch new file mode 100644 index 0000000..acdbf8b --- /dev/null +++ b/patches.suse/Bluetooth-hci_-ldisc-serdev-check-percpu_init_rwsem-.patch @@ -0,0 +1,93 @@ +From 3124d320c22f3f4388d9ac5c8f37eaad0cefd6b1 Mon Sep 17 00:00:00 2001 +From: Tetsuo Handa +Date: Mon, 29 Aug 2022 23:58:12 +0900 +Subject: [PATCH] Bluetooth: hci_{ldisc,serdev}: check percpu_init_rwsem() failure +Git-commit: 3124d320c22f3f4388d9ac5c8f37eaad0cefd6b1 +Patch-mainline: v6.1-rc1 +References: git-fixes + +syzbot is reporting NULL pointer dereference at hci_uart_tty_close() [1], +for rcu_sync_enter() is called without rcu_sync_init() due to +hci_uart_tty_open() ignoring percpu_init_rwsem() failure. + +While we are at it, fix that hci_uart_register_device() ignores +percpu_init_rwsem() failure and hci_uart_unregister_device() does not +call percpu_free_rwsem(). + +Link: https://syzkaller.appspot.com/bug?extid=576dfca25381fb6fbc5f [1] +Reported-by: syzbot +Signed-off-by: Tetsuo Handa +Fixes: 67d2f8781b9f00d1 ("Bluetooth: hci_ldisc: Allow sleeping while proto locks are held.") +Fixes: d73e172816652772 ("Bluetooth: hci_serdev: Init hci_uart proto_lock to avoid oops") +Signed-off-by: Luiz Augusto von Dentz +Acked-by: Takashi Iwai + +--- + drivers/bluetooth/hci_ldisc.c | 7 +++++-- + drivers/bluetooth/hci_serdev.c | 10 +++++++--- + 2 files changed, 12 insertions(+), 5 deletions(-) + +diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c +index f537673ede17..865112e96ff9 100644 +--- a/drivers/bluetooth/hci_ldisc.c ++++ b/drivers/bluetooth/hci_ldisc.c +@@ -493,6 +493,11 @@ static int hci_uart_tty_open(struct tty_struct *tty) + BT_ERR("Can't allocate control structure"); + return -ENFILE; + } ++ if (percpu_init_rwsem(&hu->proto_lock)) { ++ BT_ERR("Can't allocate semaphore structure"); ++ kfree(hu); ++ return -ENOMEM; ++ } + + tty->disc_data = hu; + hu->tty = tty; +@@ -505,8 +510,6 @@ static int hci_uart_tty_open(struct tty_struct *tty) + INIT_WORK(&hu->init_ready, hci_uart_init_work); + INIT_WORK(&hu->write_work, hci_uart_write_work); + +- percpu_init_rwsem(&hu->proto_lock); +- + /* Flush any pending characters in the driver */ + tty_driver_flush_buffer(tty); + +diff --git a/drivers/bluetooth/hci_serdev.c b/drivers/bluetooth/hci_serdev.c +index c0e5f42ec6b7..f16fd79bc02b 100644 +--- a/drivers/bluetooth/hci_serdev.c ++++ b/drivers/bluetooth/hci_serdev.c +@@ -310,11 +310,12 @@ int hci_uart_register_device(struct hci_uart *hu, + + serdev_device_set_client_ops(hu->serdev, &hci_serdev_client_ops); + ++ if (percpu_init_rwsem(&hu->proto_lock)) ++ return -ENOMEM; ++ + err = serdev_device_open(hu->serdev); + if (err) +- return err; +- +- percpu_init_rwsem(&hu->proto_lock); ++ goto err_rwsem; + + err = p->open(hu); + if (err) +@@ -389,6 +390,8 @@ int hci_uart_register_device(struct hci_uart *hu, + p->close(hu); + err_open: + serdev_device_close(hu->serdev); ++err_rwsem: ++ percpu_free_rwsem(&hu->proto_lock); + return err; + } + EXPORT_SYMBOL_GPL(hci_uart_register_device); +@@ -410,5 +413,6 @@ void hci_uart_unregister_device(struct hci_uart *hu) + clear_bit(HCI_UART_PROTO_READY, &hu->flags); + serdev_device_close(hu->serdev); + } ++ percpu_free_rwsem(&hu->proto_lock); + } + EXPORT_SYMBOL_GPL(hci_uart_unregister_device); +-- +2.35.3 + diff --git a/patches.suse/Bluetooth-hci_core-Fix-not-handling-link-timeouts-pr.patch b/patches.suse/Bluetooth-hci_core-Fix-not-handling-link-timeouts-pr.patch new file mode 100644 index 0000000..123e053 --- /dev/null +++ b/patches.suse/Bluetooth-hci_core-Fix-not-handling-link-timeouts-pr.patch @@ -0,0 +1,104 @@ +From 116523c8fac05d1d26f748fee7919a4ec5df67ea Mon Sep 17 00:00:00 2001 +From: Luiz Augusto von Dentz +Date: Mon, 26 Sep 2022 15:44:42 -0700 +Subject: [PATCH] Bluetooth: hci_core: Fix not handling link timeouts propertly +Git-commit: 116523c8fac05d1d26f748fee7919a4ec5df67ea +Patch-mainline: v6.1-rc1 +References: git-fixes + +Change that introduced the use of __check_timeout did not account for +link types properly, it always assumes ACL_LINK is used thus causing +hdev->acl_last_tx to be used even in case of LE_LINK and then again +uses ACL_LINK with hci_link_tx_to. + +To fix this __check_timeout now takes the link type as parameter and +then procedure to use the right last_tx based on the link type and pass +it to hci_link_tx_to. + +Fixes: 1b1d29e51499 ("Bluetooth: Make use of __check_timeout on hci_sched_le") +Signed-off-by: Luiz Augusto von Dentz +Tested-by: David Beinder +Acked-by: Takashi Iwai + +--- + net/bluetooth/hci_core.c | 34 +++++++++++++++++++++++----------- + 1 file changed, 23 insertions(+), 11 deletions(-) + +diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c +index 66c7cdba0d32..063fbb8e07ca 100644 +--- a/net/bluetooth/hci_core.c ++++ b/net/bluetooth/hci_core.c +@@ -3485,15 +3485,27 @@ static inline int __get_blocks(struct hci_dev *hdev, struct sk_buff *skb) + return DIV_ROUND_UP(skb->len - HCI_ACL_HDR_SIZE, hdev->block_len); + } + +-static void __check_timeout(struct hci_dev *hdev, unsigned int cnt) ++static void __check_timeout(struct hci_dev *hdev, unsigned int cnt, u8 type) + { +- if (!hci_dev_test_flag(hdev, HCI_UNCONFIGURED)) { +- /* ACL tx timeout must be longer than maximum +- * link supervision timeout (40.9 seconds) */ +- if (!cnt && time_after(jiffies, hdev->acl_last_tx + +- HCI_ACL_TX_TIMEOUT)) +- hci_link_tx_to(hdev, ACL_LINK); ++ unsigned long last_tx; ++ ++ if (hci_dev_test_flag(hdev, HCI_UNCONFIGURED)) ++ return; ++ ++ switch (type) { ++ case LE_LINK: ++ last_tx = hdev->le_last_tx; ++ break; ++ default: ++ last_tx = hdev->acl_last_tx; ++ break; + } ++ ++ /* tx timeout must be longer than maximum link supervision timeout ++ * (40.9 seconds) ++ */ ++ if (!cnt && time_after(jiffies, last_tx + HCI_ACL_TX_TIMEOUT)) ++ hci_link_tx_to(hdev, type); + } + + /* Schedule SCO */ +@@ -3551,7 +3563,7 @@ static void hci_sched_acl_pkt(struct hci_dev *hdev) + struct sk_buff *skb; + int quote; + +- __check_timeout(hdev, cnt); ++ __check_timeout(hdev, cnt, ACL_LINK); + + while (hdev->acl_cnt && + (chan = hci_chan_sent(hdev, ACL_LINK, "e))) { +@@ -3594,8 +3606,6 @@ static void hci_sched_acl_blk(struct hci_dev *hdev) + int quote; + u8 type; + +- __check_timeout(hdev, cnt); +- + BT_DBG("%s", hdev->name); + + if (hdev->dev_type == HCI_AMP) +@@ -3603,6 +3613,8 @@ static void hci_sched_acl_blk(struct hci_dev *hdev) + else + type = ACL_LINK; + ++ __check_timeout(hdev, cnt, type); ++ + while (hdev->block_cnt > 0 && + (chan = hci_chan_sent(hdev, type, "e))) { + u32 priority = (skb_peek(&chan->data_q))->priority; +@@ -3676,7 +3688,7 @@ static void hci_sched_le(struct hci_dev *hdev) + + cnt = hdev->le_pkts ? hdev->le_cnt : hdev->acl_cnt; + +- __check_timeout(hdev, cnt); ++ __check_timeout(hdev, cnt, LE_LINK); + + tmp = cnt; + while (cnt && (chan = hci_chan_sent(hdev, LE_LINK, "e))) { +-- +2.35.3 + diff --git a/patches.suse/can-rx-offload-can_rx_offload_init_queue-fix-typo.patch b/patches.suse/can-rx-offload-can_rx_offload_init_queue-fix-typo.patch new file mode 100644 index 0000000..fbb4373 --- /dev/null +++ b/patches.suse/can-rx-offload-can_rx_offload_init_queue-fix-typo.patch @@ -0,0 +1,39 @@ +From 766108d91246530d31b42765046f7ec2d1e42581 Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Wed, 10 Aug 2022 21:38:00 +0200 +Subject: [PATCH] can: rx-offload: can_rx_offload_init_queue(): fix typo +Mime-version: 1.0 +Content-type: text/plain; charset=UTF-8 +Content-transfer-encoding: 8bit +Git-commit: 766108d91246530d31b42765046f7ec2d1e42581 +Patch-mainline: v6.1-rc1 +References: git-fixes + +Fix typo "rounted" -> "rounded". + +Link: https://lore.kernel.org/all/20220811093617.1861938-2-mkl@pengutronix.de +Fixes: d254586c3453 ("can: rx-offload: Add support for HW fifo based irq offloading") +Reported-by: Uwe Kleine-König +Signed-off-by: Marc Kleine-Budde +Acked-by: Takashi Iwai + +--- + drivers/net/can/dev/rx-offload.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/can/dev/rx-offload.c b/drivers/net/can/dev/rx-offload.c +index a32a01c172d4..ad8eb243fe78 100644 +--- a/drivers/net/can/dev/rx-offload.c ++++ b/drivers/net/can/dev/rx-offload.c +@@ -329,7 +329,7 @@ static int can_rx_offload_init_queue(struct net_device *dev, + { + offload->dev = dev; + +- /* Limit queue len to 4x the weight (rounted to next power of two) */ ++ /* Limit queue len to 4x the weight (rounded to next power of two) */ + offload->skb_queue_len_max = 2 << fls(weight); + offload->skb_queue_len_max *= 4; + skb_queue_head_init(&offload->skb_queue); +-- +2.35.3 + diff --git a/patches.suse/eth-alx-take-rtnl_lock-on-resume.patch b/patches.suse/eth-alx-take-rtnl_lock-on-resume.patch new file mode 100644 index 0000000..1d29961 --- /dev/null +++ b/patches.suse/eth-alx-take-rtnl_lock-on-resume.patch @@ -0,0 +1,78 @@ +From 6ad1c94e1e7e374d88f0cfd77936dddb8339aaba Mon Sep 17 00:00:00 2001 +From: Jakub Kicinski +Date: Wed, 28 Sep 2022 11:12:36 -0700 +Subject: [PATCH] eth: alx: take rtnl_lock on resume +Git-commit: 6ad1c94e1e7e374d88f0cfd77936dddb8339aaba +Patch-mainline: v6.1-rc1 +References: git-fixes + +Zbynek reports that alx trips an rtnl assertion on resume: + + RTNL: assertion failed at net/core/dev.c (2891) + RIP: 0010:netif_set_real_num_tx_queues+0x1ac/0x1c0 + Call Trace: + + __alx_open+0x230/0x570 [alx] + alx_resume+0x54/0x80 [alx] + ? pci_legacy_resume+0x80/0x80 + dpm_run_callback+0x4a/0x150 + device_resume+0x8b/0x190 + async_resume+0x19/0x30 + async_run_entry_fn+0x30/0x130 + process_one_work+0x1e5/0x3b0 + +indeed the driver does not hold rtnl_lock during its internal close +and re-open functions during suspend/resume. Note that this is not +a huge bug as the driver implements its own locking, and does not +implement changing the number of queues, but we need to silence +the splat. + +Fixes: 4a5fe57e7751 ("alx: use fine-grained locking instead of RTNL") +Reported-and-tested-by: Zbynek Michl +Reviewed-by: Niels Dossche +Link: https://lore.kernel.org/r/20220928181236.1053043-1-kuba@kernel.org +Signed-off-by: Jakub Kicinski +Acked-by: Takashi Iwai + +--- + drivers/net/ethernet/atheros/alx/main.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c +index a89b93cb4e26..d5939586c82e 100644 +--- a/drivers/net/ethernet/atheros/alx/main.c ++++ b/drivers/net/ethernet/atheros/alx/main.c +@@ -1912,11 +1912,14 @@ static int alx_suspend(struct device *dev) + + if (!netif_running(alx->dev)) + return 0; ++ ++ rtnl_lock(); + netif_device_detach(alx->dev); + + mutex_lock(&alx->mtx); + __alx_stop(alx); + mutex_unlock(&alx->mtx); ++ rtnl_unlock(); + + return 0; + } +@@ -1927,6 +1930,7 @@ static int alx_resume(struct device *dev) + struct alx_hw *hw = &alx->hw; + int err; + ++ rtnl_lock(); + mutex_lock(&alx->mtx); + alx_reset_phy(hw); + +@@ -1943,6 +1947,7 @@ static int alx_resume(struct device *dev) + + unlock: + mutex_unlock(&alx->mtx); ++ rtnl_unlock(); + return err; + } + +-- +2.35.3 + diff --git a/patches.suse/hwmon-gsc-hwmon-Call-of_node_get-before-of_find_xxx-.patch b/patches.suse/hwmon-gsc-hwmon-Call-of_node_get-before-of_find_xxx-.patch new file mode 100644 index 0000000..0ad9c5c --- /dev/null +++ b/patches.suse/hwmon-gsc-hwmon-Call-of_node_get-before-of_find_xxx-.patch @@ -0,0 +1,35 @@ +From 7f62cf781e6567d59c8935dc8c6068ce2bb904b7 Mon Sep 17 00:00:00 2001 +From: Liang He +Date: Fri, 16 Sep 2022 23:47:08 +0800 +Subject: [PATCH] hwmon: (gsc-hwmon) Call of_node_get() before of_find_xxx API +Git-commit: 7f62cf781e6567d59c8935dc8c6068ce2bb904b7 +Patch-mainline: v6.1-rc1 +References: git-fixes + +In gsc_hwmon_get_devtree_pdata(), we should call of_node_get() before +the of_find_compatible_node() which will automatically call +of_node_put() for the 'from' argument. + +Fixes: 3bce5377ef66 ("hwmon: Add Gateworks System Controller support") +Signed-off-by: Liang He +Co-developed-by: Mengda Chen +Signed-off-by: Mengda Chen +Link: https://lore.kernel.org/r/20220916154708.3084515-1-chenmengda2009@163.com +Cc: stable@vger.kernel.org +Signed-off-by: Guenter Roeck +Acked-by: Takashi Iwai + +--- + drivers/hwmon/gsc-hwmon.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/hwmon/gsc-hwmon.c ++++ b/drivers/hwmon/gsc-hwmon.c +@@ -267,6 +267,7 @@ gsc_hwmon_get_devtree_pdata(struct devic + pdata->nchannels = nchannels; + + /* fan controller base address */ ++ of_node_get(dev->parent->of_node); + fan = of_find_compatible_node(dev->parent->of_node, NULL, "gw,gsc-fan"); + if (fan && of_property_read_u32(fan, "reg", &pdata->fan_base)) { + dev_err(dev, "fan node without base\n"); diff --git a/patches.suse/hwmon-pmbus-mp2888-Fix-sensors-readouts-for-MPS-Mult.patch b/patches.suse/hwmon-pmbus-mp2888-Fix-sensors-readouts-for-MPS-Mult.patch new file mode 100644 index 0000000..5624499 --- /dev/null +++ b/patches.suse/hwmon-pmbus-mp2888-Fix-sensors-readouts-for-MPS-Mult.patch @@ -0,0 +1,80 @@ +From 525dd5aed67a2f4f7278116fb92a24e6a53e2622 Mon Sep 17 00:00:00 2001 +From: Oleksandr Shamray +Date: Thu, 29 Sep 2022 15:16:42 +0300 +Subject: [PATCH] hwmon: (pmbus/mp2888) Fix sensors readouts for MPS Multi-phase mp2888 controller +Git-commit: 525dd5aed67a2f4f7278116fb92a24e6a53e2622 +Patch-mainline: v6.1-rc1 +References: git-fixes + +Fix scale factors for reading MPS Multi-phase mp2888 controller. +Fixed sensors: + - PIN/POUT: based on vendor documentation, set bscale factor 0.5W/LSB + - IOUT: based on vendor documentation, set scale factor 0.25 A/LSB + +Fixes: e4db7719d037 ("hwmon: (pmbus) Add support for MPS Multi-phase mp2888 controller") +Signed-off-by: Oleksandr Shamray +Reviewed-by: Vadim Pasternak +Link: https://lore.kernel.org/r/20220929121642.63051-1-oleksandrs@nvidia.com +Signed-off-by: Guenter Roeck +Acked-by: Takashi Iwai + +--- + drivers/hwmon/pmbus/mp2888.c | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +diff --git a/drivers/hwmon/pmbus/mp2888.c b/drivers/hwmon/pmbus/mp2888.c +index 8ecd4adfef40..24e5194706cf 100644 +--- a/drivers/hwmon/pmbus/mp2888.c ++++ b/drivers/hwmon/pmbus/mp2888.c +@@ -34,7 +34,7 @@ struct mp2888_data { + int curr_sense_gain; + }; + +-#define to_mp2888_data(x) container_of(x, struct mp2888_data, info) ++#define to_mp2888_data(x) container_of(x, struct mp2888_data, info) + + static int mp2888_read_byte_data(struct i2c_client *client, int page, int reg) + { +@@ -109,7 +109,7 @@ mp2888_read_phase(struct i2c_client *client, struct mp2888_data *data, int page, + * - Kcs is the DrMOS current sense gain of power stage, which is obtained from the + * register MP2888_MFR_VR_CONFIG1, bits 13-12 with the following selection of DrMOS + * (data->curr_sense_gain): +- * 00b - 5µA/A, 01b - 8.5µA/A, 10b - 9.7µA/A, 11b - 10µA/A. ++ * 00b - 8.5µA/A, 01b - 9.7µA/A, 1b - 10µA/A, 11b - 5µA/A. + * - Rcs is the internal phase current sense resistor. This parameter depends on hardware + * assembly. By default it is set to 1kΩ. In case of different assembly, user should + * scale this parameter by dividing it by Rcs. +@@ -118,10 +118,9 @@ mp2888_read_phase(struct i2c_client *client, struct mp2888_data *data, int page, + * because sampling of current occurrence of bit weight has a big deviation, especially for + * light load. + */ +- ret = DIV_ROUND_CLOSEST(ret * 100 - 9800, data->curr_sense_gain); +- ret = (data->phase_curr_resolution) ? ret * 2 : ret; ++ ret = DIV_ROUND_CLOSEST(ret * 200 - 19600, data->curr_sense_gain); + /* Scale according to total current resolution. */ +- ret = (data->total_curr_resolution) ? ret * 8 : ret * 4; ++ ret = (data->total_curr_resolution) ? ret * 2 : ret; + return ret; + } + +@@ -212,7 +211,7 @@ static int mp2888_read_word_data(struct i2c_client *client, int page, int phase, + ret = pmbus_read_word_data(client, page, phase, reg); + if (ret < 0) + return ret; +- ret = data->total_curr_resolution ? ret * 2 : ret; ++ ret = data->total_curr_resolution ? ret : DIV_ROUND_CLOSEST(ret, 2); + break; + case PMBUS_POUT_OP_WARN_LIMIT: + ret = pmbus_read_word_data(client, page, phase, reg); +@@ -223,7 +222,7 @@ static int mp2888_read_word_data(struct i2c_client *client, int page, int phase, + * set 1. Actual power is reported with 0.5W or 1W respectively resolution. Scaling + * is needed to match both. + */ +- ret = data->total_curr_resolution ? ret * 4 : ret * 2; ++ ret = data->total_curr_resolution ? ret * 2 : ret; + break; + /* + * The below registers are not implemented by device or implemented not according to the +-- +2.35.3 + diff --git a/patches.suse/i2c-mlxbf-support-lock-mechanism.patch b/patches.suse/i2c-mlxbf-support-lock-mechanism.patch new file mode 100644 index 0000000..56f8208 --- /dev/null +++ b/patches.suse/i2c-mlxbf-support-lock-mechanism.patch @@ -0,0 +1,121 @@ +From 86067ccfa1424a26491542d6f6d7546d40b61a10 Mon Sep 17 00:00:00 2001 +From: Asmaa Mnebhi +Date: Mon, 26 Sep 2022 15:45:04 -0400 +Subject: [PATCH] i2c: mlxbf: support lock mechanism +Git-commit: 86067ccfa1424a26491542d6f6d7546d40b61a10 +Patch-mainline: v6.1-rc1 +References: git-fixes + +Linux is not the only entity using the BlueField I2C busses so +support a lock mechanism provided by hardware to avoid issues +when multiple entities are trying to access the same bus. + +The lock is acquired whenever written explicitely or the lock +register is read. So make sure it is always released at the end +of a successful or failed transaction. + +Fixes: b5b5b32081cd206b (i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC) +Reviewed-by: Khalil Blaiech +Signed-off-by: Asmaa Mnebhi +Signed-off-by: Wolfram Sang +Acked-by: Takashi Iwai + +--- + drivers/i2c/busses/i2c-mlxbf.c | 44 ++++++++++++++++++++++++++++++---- + 1 file changed, 39 insertions(+), 5 deletions(-) + +diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c +index 1a0fc9640c23..78b2bc9b0a34 100644 +--- a/drivers/i2c/busses/i2c-mlxbf.c ++++ b/drivers/i2c/busses/i2c-mlxbf.c +@@ -306,6 +306,7 @@ static u64 mlxbf_i2c_corepll_frequency; + * exact. + */ + #define MLXBF_I2C_SMBUS_TIMEOUT (300 * 1000) /* 300ms */ ++#define MLXBF_I2C_SMBUS_LOCK_POLL_TIMEOUT (300 * 1000) /* 300ms */ + + /* Encapsulates timing parameters. */ + struct mlxbf_i2c_timings { +@@ -514,6 +515,25 @@ static bool mlxbf_smbus_master_wait_for_idle(struct mlxbf_i2c_priv *priv) + return false; + } + ++/* ++ * wait for the lock to be released before acquiring it. ++ */ ++static bool mlxbf_i2c_smbus_master_lock(struct mlxbf_i2c_priv *priv) ++{ ++ if (mlxbf_smbus_poll(priv->smbus->io, MLXBF_I2C_SMBUS_MASTER_GW, ++ MLXBF_I2C_MASTER_LOCK_BIT, true, ++ MLXBF_I2C_SMBUS_LOCK_POLL_TIMEOUT)) ++ return true; ++ ++ return false; ++} ++ ++static void mlxbf_i2c_smbus_master_unlock(struct mlxbf_i2c_priv *priv) ++{ ++ /* Clear the gw to clear the lock */ ++ writel(0, priv->smbus->io + MLXBF_I2C_SMBUS_MASTER_GW); ++} ++ + static bool mlxbf_i2c_smbus_transaction_success(u32 master_status, + u32 cause_status) + { +@@ -705,10 +725,19 @@ mlxbf_i2c_smbus_start_transaction(struct mlxbf_i2c_priv *priv, + slave = request->slave & GENMASK(6, 0); + addr = slave << 1; + +- /* First of all, check whether the HW is idle. */ +- if (WARN_ON(!mlxbf_smbus_master_wait_for_idle(priv))) ++ /* ++ * Try to acquire the smbus gw lock before any reads of the GW register since ++ * a read sets the lock. ++ */ ++ if (WARN_ON(!mlxbf_i2c_smbus_master_lock(priv))) + return -EBUSY; + ++ /* Check whether the HW is idle */ ++ if (WARN_ON(!mlxbf_smbus_master_wait_for_idle(priv))) { ++ ret = -EBUSY; ++ goto out_unlock; ++ } ++ + /* Set first byte. */ + data_desc[data_idx++] = addr; + +@@ -732,8 +761,10 @@ mlxbf_i2c_smbus_start_transaction(struct mlxbf_i2c_priv *priv, + write_en = 1; + write_len += operation->length; + if (data_idx + operation->length > +- MLXBF_I2C_MASTER_DATA_DESC_SIZE) +- return -ENOBUFS; ++ MLXBF_I2C_MASTER_DATA_DESC_SIZE) { ++ ret = -ENOBUFS; ++ goto out_unlock; ++ } + memcpy(data_desc + data_idx, + operation->buffer, operation->length); + data_idx += operation->length; +@@ -765,7 +796,7 @@ mlxbf_i2c_smbus_start_transaction(struct mlxbf_i2c_priv *priv, + ret = mlxbf_i2c_smbus_enable(priv, slave, write_len, block_en, + pec_en, 0); + if (ret) +- return ret; ++ goto out_unlock; + } + + if (read_en) { +@@ -792,6 +823,9 @@ mlxbf_i2c_smbus_start_transaction(struct mlxbf_i2c_priv *priv, + priv->smbus->io + MLXBF_I2C_SMBUS_MASTER_FSM); + } + ++out_unlock: ++ mlxbf_i2c_smbus_master_unlock(priv); ++ + return ret; + } + +-- +2.35.3 + diff --git a/patches.suse/mISDN-fix-use-after-free-bugs-in-l1oip-timer-handler.patch b/patches.suse/mISDN-fix-use-after-free-bugs-in-l1oip-timer-handler.patch new file mode 100644 index 0000000..7a789a1 --- /dev/null +++ b/patches.suse/mISDN-fix-use-after-free-bugs-in-l1oip-timer-handler.patch @@ -0,0 +1,97 @@ +From 2568a7e0832ee30b0a351016d03062ab4e0e0a3f Mon Sep 17 00:00:00 2001 +From: Duoming Zhou +Date: Wed, 28 Sep 2022 21:39:38 +0800 +Subject: [PATCH] mISDN: fix use-after-free bugs in l1oip timer handlers +Git-commit: 2568a7e0832ee30b0a351016d03062ab4e0e0a3f +Patch-mainline: v6.1-rc1 +References: git-fixes + +The l1oip_cleanup() traverses the l1oip_ilist and calls +release_card() to cleanup module and stack. However, +release_card() calls del_timer() to delete the timers +such as keep_tl and timeout_tl. If the timer handler is +running, the del_timer() will not stop it and result in +UAF bugs. One of the processes is shown below: + + (cleanup routine) | (timer handler) +release_card() | l1oip_timeout() + ... | + del_timer() | ... + ... | + kfree(hc) //FREE | + | hc->timeout_on = 0 //USE + +Fix by calling del_timer_sync() in release_card(), which +makes sure the timer handlers have finished before the +resources, such as l1oip and so on, have been deallocated. + +What's more, the hc->workq and hc->socket_thread can kick +those timers right back in. We add a bool flag to show +if card is released. Then, check this flag in hc->workq +and hc->socket_thread. + +Fixes: 3712b42d4b1b ("Add layer1 over IP support") +Signed-off-by: Duoming Zhou +Reviewed-by: Leon Romanovsky +Signed-off-by: David S. Miller +Acked-by: Takashi Iwai + +--- + drivers/isdn/mISDN/l1oip.h | 1 + + drivers/isdn/mISDN/l1oip_core.c | 13 +++++++------ + 2 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/drivers/isdn/mISDN/l1oip.h b/drivers/isdn/mISDN/l1oip.h +index 7ea10db20e3a..48133d022812 100644 +--- a/drivers/isdn/mISDN/l1oip.h ++++ b/drivers/isdn/mISDN/l1oip.h +@@ -59,6 +59,7 @@ struct l1oip { + int bundle; /* bundle channels in one frm */ + int codec; /* codec to use for transmis. */ + int limit; /* limit number of bchannels */ ++ bool shutdown; /* if card is released */ + + /* timer */ + struct timer_list keep_tl; +diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c +index 2c40412466e6..a77195e378b7 100644 +--- a/drivers/isdn/mISDN/l1oip_core.c ++++ b/drivers/isdn/mISDN/l1oip_core.c +@@ -275,7 +275,7 @@ l1oip_socket_send(struct l1oip *hc, u8 localcodec, u8 channel, u32 chanmask, + p = frame; + + /* restart timer */ +- if (time_before(hc->keep_tl.expires, jiffies + 5 * HZ)) ++ if (time_before(hc->keep_tl.expires, jiffies + 5 * HZ) && !hc->shutdown) + mod_timer(&hc->keep_tl, jiffies + L1OIP_KEEPALIVE * HZ); + else + hc->keep_tl.expires = jiffies + L1OIP_KEEPALIVE * HZ; +@@ -601,7 +601,9 @@ l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) + goto multiframe; + + /* restart timer */ +- if (time_before(hc->timeout_tl.expires, jiffies + 5 * HZ) || !hc->timeout_on) { ++ if ((time_before(hc->timeout_tl.expires, jiffies + 5 * HZ) || ++ !hc->timeout_on) && ++ !hc->shutdown) { + hc->timeout_on = 1; + mod_timer(&hc->timeout_tl, jiffies + L1OIP_TIMEOUT * HZ); + } else /* only adjust timer */ +@@ -1232,11 +1234,10 @@ release_card(struct l1oip *hc) + { + int ch; + +- if (timer_pending(&hc->keep_tl)) +- del_timer(&hc->keep_tl); ++ hc->shutdown = true; + +- if (timer_pending(&hc->timeout_tl)) +- del_timer(&hc->timeout_tl); ++ del_timer_sync(&hc->keep_tl); ++ del_timer_sync(&hc->timeout_tl); + + cancel_work_sync(&hc->workq); + +-- +2.35.3 + diff --git a/patches.suse/media-aspeed-Fix-an-error-handling-path-in-aspeed_vi.patch b/patches.suse/media-aspeed-Fix-an-error-handling-path-in-aspeed_vi.patch new file mode 100644 index 0000000..0aa38bf --- /dev/null +++ b/patches.suse/media-aspeed-Fix-an-error-handling-path-in-aspeed_vi.patch @@ -0,0 +1,51 @@ +From 310fda622bbd38be17fb444f7f049b137af3bc0d Mon Sep 17 00:00:00 2001 +From: Christophe JAILLET +Date: Sun, 6 Mar 2022 19:08:07 +0100 +Subject: [PATCH] media: aspeed: Fix an error handling path in + aspeed_video_probe() +Git-commit: 310fda622bbd38be17fb444f7f049b137af3bc0d +References: git-fixes +Patch-mainline: v5.19-rc1 + +A dma_free_coherent() call is missing in the error handling path of the +probe, as already done in the remove function. + +In fact, this call is included in aspeed_video_free_buf(). So use the +latter both in the error handling path of the probe and in the remove +function. +It is easier to see the relation with aspeed_video_alloc_buf() this way. + +Fixes: d2b4387f3bdf ("media: platform: Add Aspeed Video Engine driver") +Signed-off-by: Christophe JAILLET +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Oliver Neukum +--- + drivers/media/platform/aspeed/aspeed-video.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/platform/aspeed/aspeed-video.c b/drivers/media/platform/aspeed/aspeed-video.c +index b937dbcbe9e0..20f795ccc11b 100644 +--- a/drivers/media/platform/aspeed-video.c ++++ b/drivers/media/platform/aspeed-video.c +@@ -1993,6 +1993,7 @@ static int aspeed_video_probe(struct platform_device *pdev) + + rc = aspeed_video_setup_video(video); + if (rc) { ++ aspeed_video_free_buf(video, &video->jpeg); + clk_unprepare(video->vclk); + clk_unprepare(video->eclk); + return rc; +@@ -2024,8 +2025,7 @@ static int aspeed_video_remove(struct platform_device *pdev) + + v4l2_device_unregister(v4l2_dev); + +- dma_free_coherent(video->dev, VE_JPEG_HEADER_SIZE, video->jpeg.virt, +- video->jpeg.dma); ++ aspeed_video_free_buf(video, &video->jpeg); + + of_reserved_mem_device_release(dev); + +-- +2.35.3 + diff --git a/patches.suse/media-coda-Add-more-H264-levels-for-CODA960.patch b/patches.suse/media-coda-Add-more-H264-levels-for-CODA960.patch new file mode 100644 index 0000000..fb54571 --- /dev/null +++ b/patches.suse/media-coda-Add-more-H264-levels-for-CODA960.patch @@ -0,0 +1,55 @@ +From eb2fd187abc878a2dfad46902becb74963473c7d Mon Sep 17 00:00:00 2001 +From: Nicolas Dufresne +Date: Wed, 6 Apr 2022 21:23:43 +0100 +Subject: [PATCH] media: coda: Add more H264 levels for CODA960 +Git-commit: eb2fd187abc878a2dfad46902becb74963473c7d +References: git-fixes +Patch-mainline: v5.19-rc1 + +Add H264 level 1.0, 4.1, 4.2 to the list of supported formats. +While the hardware does not fully support these levels, it does support +most of them. The constraints on frame size and pixel formats already +cover the limitation. + +This fixes negotiation of level on GStreamer 1.17.1. + +Cc: stable@vger.kernel.org +Fixes: 42a68012e67c2 ("media: coda: add read-only h.264 decoder profile/level controls") +Suggested-by: Philipp Zabel +Signed-off-by: Nicolas Dufresne +Signed-off-by: Ezequiel Garcia +Signed-off-by: Fabio Estevam +Reviewed-by: Philipp Zabel +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Oliver Neukum +--- + drivers/media/platform/chips-media/coda-common.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/drivers/media/platform/chips-media/coda-common.c b/drivers/media/platform/chips-media/coda-common.c +index 36ec5a50a491..d246afcb3f49 100644 +--- a/drivers/media/platform/coda/coda-common.c ++++ b/drivers/media/platform/coda/coda-common.c +@@ -2347,12 +2347,15 @@ static void coda_encode_ctrls(struct coda_ctx *ctx) + if (ctx->dev->devtype->product == CODA_960) { + v4l2_ctrl_new_std_menu(&ctx->ctrls, &coda_ctrl_ops, + V4L2_CID_MPEG_VIDEO_H264_LEVEL, +- V4L2_MPEG_VIDEO_H264_LEVEL_4_0, +- ~((1 << V4L2_MPEG_VIDEO_H264_LEVEL_2_0) | ++ V4L2_MPEG_VIDEO_H264_LEVEL_4_2, ++ ~((1 << V4L2_MPEG_VIDEO_H264_LEVEL_1_0) | ++ (1 << V4L2_MPEG_VIDEO_H264_LEVEL_2_0) | + (1 << V4L2_MPEG_VIDEO_H264_LEVEL_3_0) | + (1 << V4L2_MPEG_VIDEO_H264_LEVEL_3_1) | + (1 << V4L2_MPEG_VIDEO_H264_LEVEL_3_2) | +- (1 << V4L2_MPEG_VIDEO_H264_LEVEL_4_0)), ++ (1 << V4L2_MPEG_VIDEO_H264_LEVEL_4_0) | ++ (1 << V4L2_MPEG_VIDEO_H264_LEVEL_4_1) | ++ (1 << V4L2_MPEG_VIDEO_H264_LEVEL_4_2)), + V4L2_MPEG_VIDEO_H264_LEVEL_4_0); + } + v4l2_ctrl_new_std(&ctx->ctrls, &coda_ctrl_ops, +-- +2.35.3 + diff --git a/patches.suse/media-coda-Fix-reported-H264-profile.patch b/patches.suse/media-coda-Fix-reported-H264-profile.patch new file mode 100644 index 0000000..72bf5c7 --- /dev/null +++ b/patches.suse/media-coda-Fix-reported-H264-profile.patch @@ -0,0 +1,60 @@ +From 7110c08ea71953a7fc342f0b76046f72442cf26c Mon Sep 17 00:00:00 2001 +From: Nicolas Dufresne +Date: Wed, 6 Apr 2022 21:23:42 +0100 +Subject: [PATCH] media: coda: Fix reported H264 profile +Git-commit: 7110c08ea71953a7fc342f0b76046f72442cf26c +References: git-fixes +Patch-mainline: v5.19-rc1 + +The CODA960 manual states that ASO/FMO features of baseline are not +supported, so for this reason this driver should only report +constrained baseline support. + +This fixes negotiation issue with constrained baseline content +on GStreamer 1.17.1. + +ASO/FMO features are unsupported for the encoder and untested for the +decoder because there is currently no userspace support. Neither GStreamer +parsers nor FFMPEG parsers support ASO/FMO. + +Cc: stable@vger.kernel.org +Fixes: 42a68012e67c2 ("media: coda: add read-only h.264 decoder profile/level controls") +Signed-off-by: Nicolas Dufresne +Signed-off-by: Ezequiel Garcia +Tested-by: Pascal Speck +Signed-off-by: Fabio Estevam +Reviewed-by: Philipp Zabel +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Oliver Neukum +--- + drivers/media/platform/chips-media/coda-common.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/media/platform/chips-media/coda-common.c b/drivers/media/platform/chips-media/coda-common.c +index 7b4942bb6c2c..36ec5a50a491 100644 +--- a/drivers/media/platform/coda/coda-common.c ++++ b/drivers/media/platform/coda/coda-common.c +@@ -2332,8 +2332,8 @@ static void coda_encode_ctrls(struct coda_ctx *ctx) + V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET, -12, 12, 1, 0); + v4l2_ctrl_new_std_menu(&ctx->ctrls, &coda_ctrl_ops, + V4L2_CID_MPEG_VIDEO_H264_PROFILE, +- V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE, 0x0, +- V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE); ++ V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE, 0x0, ++ V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE); + if (ctx->dev->devtype->product == CODA_HX4 || + ctx->dev->devtype->product == CODA_7541) { + v4l2_ctrl_new_std_menu(&ctx->ctrls, &coda_ctrl_ops, +@@ -2414,7 +2414,7 @@ static void coda_decode_ctrls(struct coda_ctx *ctx) + ctx->h264_profile_ctrl = v4l2_ctrl_new_std_menu(&ctx->ctrls, + &coda_ctrl_ops, V4L2_CID_MPEG_VIDEO_H264_PROFILE, + V4L2_MPEG_VIDEO_H264_PROFILE_HIGH, +- ~((1 << V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE) | ++ ~((1 << V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE) | + (1 << V4L2_MPEG_VIDEO_H264_PROFILE_MAIN) | + (1 << V4L2_MPEG_VIDEO_H264_PROFILE_HIGH)), + V4L2_MPEG_VIDEO_H264_PROFILE_HIGH); +-- +2.35.3 + diff --git a/patches.suse/media-exynos4-is-Change-clk_disable-to-clk_disable_u.patch b/patches.suse/media-exynos4-is-Change-clk_disable-to-clk_disable_u.patch new file mode 100644 index 0000000..b66bcb3 --- /dev/null +++ b/patches.suse/media-exynos4-is-Change-clk_disable-to-clk_disable_u.patch @@ -0,0 +1,39 @@ +From 9fadab72a6916c7507d7fedcd644859eef995078 Mon Sep 17 00:00:00 2001 +From: Miaoqian Lin +Date: Fri, 18 Mar 2022 12:01:01 +0100 +Subject: [PATCH] media: exynos4-is: Change clk_disable to + clk_disable_unprepare +Git-commit: 9fadab72a6916c7507d7fedcd644859eef995078 +References: git-fixes +Patch-mainline: v5.19-rc1 + +The corresponding API for clk_prepare_enable is clk_disable_unprepare, +other than clk_disable. + +Fix this by changing clk_disable to clk_disable_unprepare. + +Fixes: b4155d7d5b2c ("[media] exynos4-is: Ensure fimc-is clocks are not enabled until properly configured") +Signed-off-by: Miaoqian Lin +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Oliver Neukum +--- + drivers/media/platform/samsung/exynos4-is/fimc-is.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-is.c b/drivers/media/platform/samsung/exynos4-is/fimc-is.c +index 81b290dace3a..e3072d69c49f 100644 +--- a/drivers/media/platform/exynos4-is/fimc-is.c ++++ b/drivers/media/platform/exynos4-is/fimc-is.c +@@ -140,7 +140,7 @@ static int fimc_is_enable_clocks(struct fimc_is *is) + dev_err(&is->pdev->dev, "clock %s enable failed\n", + fimc_is_clocks[i]); + for (--i; i >= 0; i--) +- clk_disable(is->clocks[i]); ++ clk_disable_unprepare(is->clocks[i]); + return ret; + } + pr_debug("enabled clock: %s\n", fimc_is_clocks[i]); +-- +2.35.3 + diff --git a/patches.suse/media-exynos4-is-Fix-PM-disable-depth-imbalance-in-f.patch b/patches.suse/media-exynos4-is-Fix-PM-disable-depth-imbalance-in-f.patch new file mode 100644 index 0000000..88a3a00 --- /dev/null +++ b/patches.suse/media-exynos4-is-Fix-PM-disable-depth-imbalance-in-f.patch @@ -0,0 +1,48 @@ +From 5c0db68ce0faeb000c3540d095eb272d671a6e03 Mon Sep 17 00:00:00 2001 +From: Miaoqian Lin +Date: Mon, 7 Mar 2022 08:52:06 +0100 +Subject: [PATCH] media: exynos4-is: Fix PM disable depth imbalance in + fimc_is_probe +Git-commit: 5c0db68ce0faeb000c3540d095eb272d671a6e03 +References: git-fixes +Patch-mainline: v5.19-rc1 + +If probe fails then we need to call pm_runtime_disable() to balance +out the previous pm_runtime_enable() call. + +Fixes: 9a761e436843 ("[media] exynos4-is: Add Exynos4x12 FIMC-IS driver") +Signed-off-by: Miaoqian Lin +Reviewed-by: Krzysztof Kozlowski +Reviewed-by: Alim Akhtar +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Oliver Neukum +--- + drivers/media/platform/samsung/exynos4-is/fimc-is.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-is.c b/drivers/media/platform/samsung/exynos4-is/fimc-is.c +index e55e411038f4..81b290dace3a 100644 +--- a/drivers/media/platform/exynos4-is/fimc-is.c ++++ b/drivers/media/platform/exynos4-is/fimc-is.c +@@ -830,7 +830,7 @@ static int fimc_is_probe(struct platform_device *pdev) + + ret = pm_runtime_resume_and_get(dev); + if (ret < 0) +- goto err_irq; ++ goto err_pm_disable; + + vb2_dma_contig_set_max_seg_size(dev, DMA_BIT_MASK(32)); + +@@ -864,6 +864,8 @@ static int fimc_is_probe(struct platform_device *pdev) + pm_runtime_put_noidle(dev); + if (!pm_runtime_enabled(dev)) + fimc_is_runtime_suspend(dev); ++err_pm_disable: ++ pm_runtime_disable(dev); + err_irq: + free_irq(is->irq, is); + err_clk: +-- +2.35.3 + diff --git a/patches.suse/media-imx-jpeg-Add-pm-sleep-support-for-imx-jpeg.patch b/patches.suse/media-imx-jpeg-Add-pm-sleep-support-for-imx-jpeg.patch new file mode 100644 index 0000000..d2fcae7 --- /dev/null +++ b/patches.suse/media-imx-jpeg-Add-pm-sleep-support-for-imx-jpeg.patch @@ -0,0 +1,60 @@ +From 7aa65a75f894a2974422fe2bc8281295310f7eb6 Mon Sep 17 00:00:00 2001 +From: Ming Qian +Date: Wed, 6 Apr 2022 10:47:03 +0100 +Subject: [PATCH] media: imx-jpeg: Add pm-sleep support for imx-jpeg +Git-commit: 7aa65a75f894a2974422fe2bc8281295310f7eb6 +References: git-fixes +Patch-mainline: v5.19-rc1 + +Wait finishing jpeg job before system sleep, +otherwise the encoding/decoding can't be resumed after suspend. + +Signed-off-by: Ming Qian +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Oliver Neukum +--- + .../media/platform/nxp/imx-jpeg/mxc-jpeg.c | 24 +++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +index c9ca7577140c..9ce1e78f5d30 100644 +--- a/drivers/media/platform/imx-jpeg/mxc-jpeg.c ++++ b/drivers/media/platform/imx-jpeg/mxc-jpeg.c +@@ -2209,9 +2209,33 @@ static int mxc_jpeg_runtime_suspend(struct device *dev) + } + #endif + ++#ifdef CONFIG_PM_SLEEP ++static int mxc_jpeg_suspend(struct device *dev) ++{ ++ struct mxc_jpeg_dev *jpeg = dev_get_drvdata(dev); ++ ++ v4l2_m2m_suspend(jpeg->m2m_dev); ++ return pm_runtime_force_suspend(dev); ++} ++ ++static int mxc_jpeg_resume(struct device *dev) ++{ ++ struct mxc_jpeg_dev *jpeg = dev_get_drvdata(dev); ++ int ret; ++ ++ ret = pm_runtime_force_resume(dev); ++ if (ret < 0) ++ return ret; ++ ++ v4l2_m2m_resume(jpeg->m2m_dev); ++ return ret; ++} ++#endif ++ + static const struct dev_pm_ops mxc_jpeg_pm_ops = { + SET_RUNTIME_PM_OPS(mxc_jpeg_runtime_suspend, + mxc_jpeg_runtime_resume, NULL) ++ SET_SYSTEM_SLEEP_PM_OPS(mxc_jpeg_suspend, mxc_jpeg_resume) + }; + + static int mxc_jpeg_remove(struct platform_device *pdev) +-- +2.35.3 + diff --git a/patches.suse/media-imx-jpeg-Correct-some-definition-according-spe.patch b/patches.suse/media-imx-jpeg-Correct-some-definition-according-spe.patch new file mode 100644 index 0000000..685c07d --- /dev/null +++ b/patches.suse/media-imx-jpeg-Correct-some-definition-according-spe.patch @@ -0,0 +1,46 @@ +From 5a601f89e846c1b6005ab274d039e5036fc22015 Mon Sep 17 00:00:00 2001 +From: Ming Qian +Date: Mon, 30 May 2022 08:47:31 +0100 +Subject: [PATCH] media: imx-jpeg: Correct some definition according + specification +Git-commit: 5a601f89e846c1b6005ab274d039e5036fc22015 +References: git-fixes +Patch-mainline: v6.0-rc1 + +the register CAST_NOMFRSIZE_LO should be equal to CAST_STATUS16 +the register CAST_NOMFRSIZE_HI should be equal to CAST_STATUS17 +the register CAST_OFBSIZE_LO should be equal to CAST_STATUS18 +the register CAST_OFBSIZE_HI should be equal to CAST_STATUS19 + +Fixes: 2db16c6ed72ce ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") +Signed-off-by: Ming Qian +Reviewed-by: Mirela Rabulea +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Oliver Neukum +--- + drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h +index e7e8954754b1..07655502f4bd 100644 +--- a/drivers/media/platform/imx-jpeg/mxc-jpeg-hw.h ++++ b/drivers/media/platform/imx-jpeg/mxc-jpeg-hw.h +@@ -53,10 +53,10 @@ + #define CAST_REC_REGS_SEL CAST_STATUS4 + #define CAST_LUMTH CAST_STATUS5 + #define CAST_CHRTH CAST_STATUS6 +-#define CAST_NOMFRSIZE_LO CAST_STATUS7 +-#define CAST_NOMFRSIZE_HI CAST_STATUS8 +-#define CAST_OFBSIZE_LO CAST_STATUS9 +-#define CAST_OFBSIZE_HI CAST_STATUS10 ++#define CAST_NOMFRSIZE_LO CAST_STATUS16 ++#define CAST_NOMFRSIZE_HI CAST_STATUS17 ++#define CAST_OFBSIZE_LO CAST_STATUS18 ++#define CAST_OFBSIZE_HI CAST_STATUS19 + + #define MXC_MAX_SLOTS 1 /* TODO use all 4 slots*/ + /* JPEG-Decoder Wrapper Slot Registers 0..3 */ +-- +2.35.3 + diff --git a/patches.suse/media-imx-jpeg-Disable-slot-interrupt-when-frame-don.patch b/patches.suse/media-imx-jpeg-Disable-slot-interrupt-when-frame-don.patch new file mode 100644 index 0000000..c660842 --- /dev/null +++ b/patches.suse/media-imx-jpeg-Disable-slot-interrupt-when-frame-don.patch @@ -0,0 +1,78 @@ +From 22a2bc88c139dc9757bdb1d0a3665ac27edc79a5 Mon Sep 17 00:00:00 2001 +From: Ming Qian +Date: Fri, 10 Jun 2022 03:00:57 +0100 +Subject: [PATCH] media: imx-jpeg: Disable slot interrupt when frame done +Git-commit: 22a2bc88c139dc9757bdb1d0a3665ac27edc79a5 +References: git-fixes +Patch-mainline: v6.0-rc1 + +The interrupt STMBUF_HALF may be triggered after frame done. +It may led to system hang if driver try to access the register after +power off. + +Disable the slot interrupt when frame done. + +Fixes: 2db16c6ed72ce ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") +Signed-off-by: Ming Qian +Reviewed-by: Mirela Rabulea +Tested-by: Mirela Rabulea +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Oliver Neukum +--- + drivers/media/platform/imx-jpeg/mxc-jpeg-hw.c | 5 +++++ + drivers/media/platform/imx-jpeg/mxc-jpeg-hw.h | 1 + + drivers/media/platform/imx-jpeg/mxc-jpeg.c | 10 ++-------- + 3 files changed, 8 insertions(+), 8 deletions(-) + +--- a/drivers/media/platform/imx-jpeg/mxc-jpeg-hw.c ++++ b/drivers/media/platform/imx-jpeg/mxc-jpeg-hw.c +@@ -79,6 +79,11 @@ void mxc_jpeg_enable_irq(void __iomem *r + writel(0xFFFFFFFF, reg + MXC_SLOT_OFFSET(slot, SLOT_IRQ_EN)); + } + ++void mxc_jpeg_disable_irq(void __iomem *reg, int slot) ++{ ++ writel(0x0, reg + MXC_SLOT_OFFSET(slot, SLOT_IRQ_EN)); ++} ++ + void mxc_jpeg_sw_reset(void __iomem *reg) + { + /* +--- a/drivers/media/platform/imx-jpeg/mxc-jpeg-hw.h ++++ b/drivers/media/platform/imx-jpeg/mxc-jpeg-hw.h +@@ -125,6 +125,7 @@ u32 mxc_jpeg_get_offset(void __iomem *re + void mxc_jpeg_enable_slot(void __iomem *reg, int slot); + void mxc_jpeg_set_l_endian(void __iomem *reg, int le); + void mxc_jpeg_enable_irq(void __iomem *reg, int slot); ++void mxc_jpeg_disable_irq(void __iomem *reg, int slot); + int mxc_jpeg_set_input(void __iomem *reg, u32 in_buf, u32 bufsize); + int mxc_jpeg_set_output(void __iomem *reg, u16 out_pitch, u32 out_buf, + u16 w, u16 h); +--- a/drivers/media/platform/imx-jpeg/mxc-jpeg.c ++++ b/drivers/media/platform/imx-jpeg/mxc-jpeg.c +@@ -555,15 +555,8 @@ static irqreturn_t mxc_jpeg_dec_irq(int + dev_dbg(dev, "Irq %d on slot %d.\n", irq, slot); + + ctx = v4l2_m2m_get_curr_priv(jpeg->m2m_dev); +- if (!ctx) { +- dev_err(dev, +- "Instance released before the end of transaction.\n"); +- /* soft reset only resets internal state, not registers */ +- mxc_jpeg_sw_reset(reg); +- /* clear all interrupts */ +- writel(0xFFFFFFFF, reg + MXC_SLOT_OFFSET(slot, SLOT_STATUS)); ++ if (WARN_ON(!ctx)) + goto job_unlock; +- } + + if (slot != ctx->slot) { + /* TODO investigate when adding multi-instance support */ +@@ -634,6 +627,7 @@ static irqreturn_t mxc_jpeg_dec_irq(int + buf_state = VB2_BUF_STATE_DONE; + + buffers_done: ++ mxc_jpeg_disable_irq(reg, ctx->slot); + jpeg->slot_data[slot].used = false; /* unused, but don't free */ + v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx); + v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx); diff --git a/patches.suse/media-imx-jpeg-Fix-potential-array-out-of-bounds-in-.patch b/patches.suse/media-imx-jpeg-Fix-potential-array-out-of-bounds-in-.patch new file mode 100644 index 0000000..7c07182 --- /dev/null +++ b/patches.suse/media-imx-jpeg-Fix-potential-array-out-of-bounds-in-.patch @@ -0,0 +1,40 @@ +From e490fa1be5fe820029aa2ff2f70bcbbcebc11d28 Mon Sep 17 00:00:00 2001 +From: Mirela Rabulea +Date: Tue, 8 Mar 2022 14:16:57 +0100 +Subject: [PATCH] media: imx-jpeg: Fix potential array out of bounds in + queue_setup +Git-commit: e490fa1be5fe820029aa2ff2f70bcbbcebc11d28 +References: git-fixes +Patch-mainline: v5.19-rc1 + +Fix smatch warning in mxc_jpeg_queue_setup, check *nplanes against +current format: + +drivers/media/platform/imx-jpeg/mxc-jpeg.c:1070 +mxc_jpeg_queue_setup() + warn: potential user controlled iterator 'i' (array size 2 vs 7) + +Signed-off-by: Mirela Rabulea +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Oliver Neukum +--- + drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +index 8b33a3bca867..87d91e927747 100644 +--- a/drivers/media/platform/imx-jpeg/mxc-jpeg.c ++++ b/drivers/media/platform/imx-jpeg/mxc-jpeg.c +@@ -1081,6 +1081,8 @@ static int mxc_jpeg_queue_setup(struct vb2_queue *q, + + /* Handle CREATE_BUFS situation - *nplanes != 0 */ + if (*nplanes) { ++ if (*nplanes != q_data->fmt->colplanes) ++ return -EINVAL; + for (i = 0; i < *nplanes; i++) { + if (sizes[i] < q_data->sizeimage[i]) + return -EINVAL; +-- +2.35.3 + diff --git a/patches.suse/media-imx-jpeg-Leave-a-blank-space-before-the-config.patch b/patches.suse/media-imx-jpeg-Leave-a-blank-space-before-the-config.patch new file mode 100644 index 0000000..8d0b0ce --- /dev/null +++ b/patches.suse/media-imx-jpeg-Leave-a-blank-space-before-the-config.patch @@ -0,0 +1,59 @@ +From 6285cdea19daf764bf00f662a59fc83ef67345cf Mon Sep 17 00:00:00 2001 +From: Ming Qian +Date: Mon, 30 May 2022 08:48:37 +0100 +Subject: [PATCH] media: imx-jpeg: Leave a blank space before the configuration + data +Git-commit: 6285cdea19daf764bf00f662a59fc83ef67345cf +References: git-fixes +Patch-mainline: v6.0-rc1 + +There is a hardware bug that it will load +the first 128 bytes of configuration data twice, +it will led to some configure error. +so shift the configuration data 128 bytes, +and make the first 128 bytes all zero, +then hardware will load the 128 zero twice, +and ignore them as garbage. +then the configuration data can be loaded correctly + +Fixes: 2db16c6ed72ce ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") +Signed-off-by: Ming Qian +Reviewed-by: Mirela Rabulea +Reviewed-by: Tommaso Merciai +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Oliver Neukum +--- + drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +index 734e1b65fbc7..c0fd030d0f19 100644 +--- a/drivers/media/platform/imx-jpeg/mxc-jpeg.c ++++ b/drivers/media/platform/imx-jpeg/mxc-jpeg.c +@@ -519,6 +519,7 @@ static bool mxc_jpeg_alloc_slot_data(struct mxc_jpeg_dev *jpeg, + GFP_ATOMIC); + if (!cfg_stm) + goto err; ++ memset(cfg_stm, 0, MXC_JPEG_MAX_CFG_STREAM); + jpeg->slot_data[slot].cfg_stream_vaddr = cfg_stm; + + skip_alloc: +@@ -755,7 +756,13 @@ static unsigned int mxc_jpeg_setup_cfg_stream(void *cfg_stream_vaddr, + u32 fourcc, + u16 w, u16 h) + { +- unsigned int offset = 0; ++ /* ++ * There is a hardware issue that first 128 bytes of configuration data ++ * can't be loaded correctly. ++ * To avoid this issue, we need to write the configuration from ++ * an offset which should be no less than 0x80 (128 bytes). ++ */ ++ unsigned int offset = 0x80; + u8 *cfg = (u8 *)cfg_stream_vaddr; + struct mxc_jpeg_sof *sof; + struct mxc_jpeg_sos *sos; +-- +2.35.3 + diff --git a/patches.suse/media-imx-jpeg-Refactor-function-mxc_jpeg_parse.patch b/patches.suse/media-imx-jpeg-Refactor-function-mxc_jpeg_parse.patch new file mode 100644 index 0000000..e6aea36 --- /dev/null +++ b/patches.suse/media-imx-jpeg-Refactor-function-mxc_jpeg_parse.patch @@ -0,0 +1,67 @@ +From 8dd504a3a0a5f73b4c137ce3afc35936a4ecd871 Mon Sep 17 00:00:00 2001 +From: Ming Qian +Date: Wed, 23 Mar 2022 10:05:54 +0100 +Subject: [PATCH] media: imx-jpeg: Refactor function mxc_jpeg_parse +Git-commit: 8dd504a3a0a5f73b4c137ce3afc35936a4ecd871 +References: git-fixes +Patch-mainline: v5.19-rc1 + +Refine code to support dynamic resolution change + +Signed-off-by: Ming Qian +Reviewed-by: Mirela Rabulea +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Oliver Neukum +--- + drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +index 87d91e927747..dda508aedac0 100644 +--- a/drivers/media/platform/imx-jpeg/mxc-jpeg.c ++++ b/drivers/media/platform/imx-jpeg/mxc-jpeg.c +@@ -1247,8 +1247,7 @@ static void mxc_jpeg_sizeimage(struct mxc_jpeg_q_data *q) + } + } + +-static int mxc_jpeg_parse(struct mxc_jpeg_ctx *ctx, +- u8 *src_addr, u32 size, bool *dht_needed) ++static int mxc_jpeg_parse(struct mxc_jpeg_ctx *ctx, struct vb2_buffer *vb) + { + struct device *dev = ctx->mxc_jpeg->dev; + struct mxc_jpeg_q_data *q_data_out, *q_data_cap; +@@ -1258,6 +1257,9 @@ static int mxc_jpeg_parse(struct mxc_jpeg_ctx *ctx, + struct v4l2_jpeg_header header; + struct mxc_jpeg_sof *psof = NULL; + struct mxc_jpeg_sos *psos = NULL; ++ struct mxc_jpeg_src_buf *jpeg_src_buf = vb2_to_mxc_buf(vb); ++ u8 *src_addr = (u8 *)vb2_plane_vaddr(vb, 0); ++ u32 size = vb2_get_plane_payload(vb, 0); + int ret; + + memset(&header, 0, sizeof(header)); +@@ -1268,7 +1270,7 @@ static int mxc_jpeg_parse(struct mxc_jpeg_ctx *ctx, + } + + /* if DHT marker present, no need to inject default one */ +- *dht_needed = (header.num_dht == 0); ++ jpeg_src_buf->dht_needed = (header.num_dht == 0); + + q_data_out = mxc_jpeg_get_q_data(ctx, + V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE); +@@ -1383,10 +1385,7 @@ static void mxc_jpeg_buf_queue(struct vb2_buffer *vb) + + jpeg_src_buf = vb2_to_mxc_buf(vb); + jpeg_src_buf->jpeg_parse_error = false; +- ret = mxc_jpeg_parse(ctx, +- (u8 *)vb2_plane_vaddr(vb, 0), +- vb2_get_plane_payload(vb, 0), +- &jpeg_src_buf->dht_needed); ++ ret = mxc_jpeg_parse(ctx, vb); + if (ret) + jpeg_src_buf->jpeg_parse_error = true; + +-- +2.35.3 + diff --git a/patches.suse/media-platform-mtk-mdp-Fix-mdp_ipi_comm-structure-al.patch b/patches.suse/media-platform-mtk-mdp-Fix-mdp_ipi_comm-structure-al.patch new file mode 100644 index 0000000..c0be249 --- /dev/null +++ b/patches.suse/media-platform-mtk-mdp-Fix-mdp_ipi_comm-structure-al.patch @@ -0,0 +1,57 @@ +From ab14c99c035da7156a3b66fa171171295bc4b89a Mon Sep 17 00:00:00 2001 +From: AngeloGioacchino Del Regno +Date: Thu, 23 Jun 2022 14:55:46 +0100 +Subject: [PATCH] media: platform: mtk-mdp: Fix mdp_ipi_comm structure + alignment +Git-commit: ab14c99c035da7156a3b66fa171171295bc4b89a +REferences: git-fixes +Patch-mainline: v6.0-rc1 + +The mdp_ipi_comm structure defines a command that is either +PROCESS (start processing) or DEINIT (destroy instance); we +are using this one to send PROCESS or DEINIT commands from Linux +to an MDP instance through a VPU write but, while the first wants +us to stay 4-bytes aligned, the VPU instead requires an 8-bytes +data alignment. + +Keeping in mind that these commands are executed immediately +after sending them (hence not chained with others before the +VPU/MDP "actually" start executing), it is fine to simply add +a padding of 4 bytes to this structure: this keeps the same +performance as before, as we're still stack-allocating it, +while avoiding hackery inside of mtk-vpu to ensure alignment +bringing a definitely bigger performance impact. + +Fixes: c8eb2d7e8202 ("[media] media: Add Mediatek MDP Driver") +Signed-off-by: AngeloGioacchino Del Regno +Reviewed-by: Houlong Wei +Reviewed-by: Irui Wang +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Oliver Neukum +--- + drivers/media/platform/mediatek/mdp/mtk_mdp_ipi.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/media/platform/mediatek/mdp/mtk_mdp_ipi.h b/drivers/media/platform/mediatek/mdp/mtk_mdp_ipi.h +index 2cb8cecb3077..b810c96695c8 100644 +--- a/drivers/media/platform/mtk-mdp/mtk_mdp_ipi.h ++++ b/drivers/media/platform/mtk-mdp/mtk_mdp_ipi.h +@@ -40,12 +40,14 @@ struct mdp_ipi_init { + * @ipi_id : IPI_MDP + * @ap_inst : AP mtk_mdp_vpu address + * @vpu_inst_addr : VPU MDP instance address ++ * @padding : Alignment padding + */ + struct mdp_ipi_comm { + uint32_t msg_id; + uint32_t ipi_id; + uint64_t ap_inst; + uint32_t vpu_inst_addr; ++ uint32_t padding; + }; + + /** +-- +2.35.3 + diff --git a/patches.suse/media-st-delta-Fix-PM-disable-depth-imbalance-in-del.patch b/patches.suse/media-st-delta-Fix-PM-disable-depth-imbalance-in-del.patch new file mode 100644 index 0000000..e9b079e --- /dev/null +++ b/patches.suse/media-st-delta-Fix-PM-disable-depth-imbalance-in-del.patch @@ -0,0 +1,57 @@ +From 94e3dba710fe0afc772172305444250023fc2d30 Mon Sep 17 00:00:00 2001 +From: Miaoqian Lin +Date: Mon, 7 Mar 2022 09:08:59 +0100 +Subject: [PATCH] media: st-delta: Fix PM disable depth imbalance in + delta_probe +Git-commit: 94e3dba710fe0afc772172305444250023fc2d30 +References: git-fixes +Patch-mainline: v5.19-rc1 + +The pm_runtime_enable will decrease power disable depth. +If the probe fails, we should use pm_runtime_disable() to balance +pm_runtime_enable(). + +Fixes: f386509e4959 ("[media] st-delta: STiH4xx multi-format video decoder v4l2 driver") +Signed-off-by: Miaoqian Lin +Acked-by: Hugues Fruchet +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Oliver Neukum +--- + drivers/media/platform/st/sti/delta/delta-v4l2.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/platform/st/sti/delta/delta-v4l2.c b/drivers/media/platform/st/sti/delta/delta-v4l2.c +index c887a31ebb54..420ad4d8df5d 100644 +--- a/drivers/media/platform/sti/delta/delta-v4l2.c ++++ b/drivers/media/platform/sti/delta/delta-v4l2.c +@@ -1859,7 +1859,7 @@ static int delta_probe(struct platform_device *pdev) + if (ret) { + dev_err(delta->dev, "%s failed to initialize firmware ipc channel\n", + DELTA_PREFIX); +- goto err; ++ goto err_pm_disable; + } + + /* register all available decoders */ +@@ -1873,7 +1873,7 @@ static int delta_probe(struct platform_device *pdev) + if (ret) { + dev_err(delta->dev, "%s failed to register V4L2 device\n", + DELTA_PREFIX); +- goto err; ++ goto err_pm_disable; + } + + delta->work_queue = create_workqueue(DELTA_NAME); +@@ -1898,6 +1898,8 @@ static int delta_probe(struct platform_device *pdev) + destroy_workqueue(delta->work_queue); + err_v4l2: + v4l2_device_unregister(&delta->v4l2_dev); ++err_pm_disable: ++ pm_runtime_disable(dev); + err: + return ret; + } +-- +2.35.3 + diff --git a/patches.suse/media-vsp1-Fix-offset-calculation-for-plane-cropping.patch b/patches.suse/media-vsp1-Fix-offset-calculation-for-plane-cropping.patch new file mode 100644 index 0000000..7cbb5da --- /dev/null +++ b/patches.suse/media-vsp1-Fix-offset-calculation-for-plane-cropping.patch @@ -0,0 +1,50 @@ +From 5f25abec8f21b7527c1223a354d23c270befddb3 Mon Sep 17 00:00:00 2001 +From: Michael Rodin +Date: Tue, 23 Nov 2021 12:50:36 +0100 +Subject: [PATCH] media: vsp1: Fix offset calculation for plane cropping +Git-commit: 5f25abec8f21b7527c1223a354d23c270befddb3 +REferences: git-fixes +Patch-mainline: v5.19-rc1 + +The vertical subsampling factor is currently not considered in the +offset calculation for plane cropping done in rpf_configure_partition. +This causes a distortion (shift of the color plane) when formats with +the vsub factor larger than 1 are used (e.g. NV12, see +vsp1_video_formats in vsp1_pipe.c). This commit considers vsub factor +for all planes except plane 0 (luminance). + +Drop generalization of the offset calculation to reduce the binary size. + +Fixes: e5ad37b64de9 ("[media] v4l: vsp1: Add cropping support") +Signed-off-by: Michael Rodin +Signed-off-by: LUU HOAI +Signed-off-by: Laurent Pinchart +Reviewed-by: Kieran Bingham +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Oliver Neukum +--- + drivers/media/platform/renesas/vsp1/vsp1_rpf.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/media/platform/renesas/vsp1/vsp1_rpf.c b/drivers/media/platform/renesas/vsp1/vsp1_rpf.c +index 85587c1b6a37..75083cb234fe 100644 +--- a/drivers/media/platform/vsp1/vsp1_rpf.c ++++ b/drivers/media/platform/vsp1/vsp1_rpf.c +@@ -291,11 +291,11 @@ static void rpf_configure_partition(struct vsp1_entity *entity, + + crop.left * fmtinfo->bpp[0] / 8; + + if (format->num_planes > 1) { ++ unsigned int bpl = format->plane_fmt[1].bytesperline; + unsigned int offset; + +- offset = crop.top * format->plane_fmt[1].bytesperline +- + crop.left / fmtinfo->hsub +- * fmtinfo->bpp[1] / 8; ++ offset = crop.top / fmtinfo->vsub * bpl ++ + crop.left / fmtinfo->hsub * fmtinfo->bpp[1] / 8; + mem.addr[1] += offset; + mem.addr[2] += offset; + } +-- +2.35.3 + diff --git a/patches.suse/mwifiex-fix-sleep-in-atomic-context-bugs-caused-by-d.patch b/patches.suse/mwifiex-fix-sleep-in-atomic-context-bugs-caused-by-d.patch new file mode 100644 index 0000000..1daf22b --- /dev/null +++ b/patches.suse/mwifiex-fix-sleep-in-atomic-context-bugs-caused-by-d.patch @@ -0,0 +1,174 @@ +From 551e4745c7f218da7070b36a06318592913676ff Mon Sep 17 00:00:00 2001 +From: Duoming Zhou +Date: Tue, 23 Aug 2022 19:21:27 +0800 +Subject: [PATCH] mwifiex: fix sleep in atomic context bugs caused by dev_coredumpv +Git-commit: 551e4745c7f218da7070b36a06318592913676ff +Patch-mainline: v6.1-rc1 +References: git-fixes + +There are sleep in atomic context bugs when uploading device dump +data in mwifiex. The root cause is that dev_coredumpv could not +be used in atomic contexts, because it calls dev_set_name which +include operations that may sleep. The call tree shows execution +paths that could lead to bugs: + + (Interrupt context) +fw_dump_timer_fn + mwifiex_upload_device_dump + dev_coredumpv(..., GFP_KERNEL) + dev_coredumpm() + kzalloc(sizeof(*devcd), gfp); //may sleep + dev_set_name + kobject_set_name_vargs + kvasprintf_const(GFP_KERNEL, ...); //may sleep + kstrdup(s, GFP_KERNEL); //may sleep + +The corresponding fail log is shown below: + +[ 135.275938] usb 1-1: == mwifiex dump information to /sys/class/devcoredump start +[ 135.281029] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:265 +... +[ 135.293613] Call Trace: +[ 135.293613] +[ 135.293613] dump_stack_lvl+0x57/0x7d +[ 135.293613] __might_resched.cold+0x138/0x173 +[ 135.293613] ? dev_coredumpm+0xca/0x2e0 +[ 135.293613] kmem_cache_alloc_trace+0x189/0x1f0 +[ 135.293613] ? devcd_match_failing+0x30/0x30 +[ 135.293613] dev_coredumpm+0xca/0x2e0 +[ 135.293613] ? devcd_freev+0x10/0x10 +[ 135.293613] dev_coredumpv+0x1c/0x20 +[ 135.293613] ? devcd_match_failing+0x30/0x30 +[ 135.293613] mwifiex_upload_device_dump+0x65/0xb0 +[ 135.293613] ? mwifiex_dnld_fw+0x1b0/0x1b0 +[ 135.293613] call_timer_fn+0x122/0x3d0 +[ 135.293613] ? msleep_interruptible+0xb0/0xb0 +[ 135.293613] ? lock_downgrade+0x3c0/0x3c0 +[ 135.293613] ? __next_timer_interrupt+0x13c/0x160 +[ 135.293613] ? lockdep_hardirqs_on_prepare+0xe/0x220 +[ 135.293613] ? mwifiex_dnld_fw+0x1b0/0x1b0 +[ 135.293613] __run_timers.part.0+0x3f8/0x540 +[ 135.293613] ? call_timer_fn+0x3d0/0x3d0 +[ 135.293613] ? arch_restore_msi_irqs+0x10/0x10 +[ 135.293613] ? lapic_next_event+0x31/0x40 +[ 135.293613] run_timer_softirq+0x4f/0xb0 +[ 135.293613] __do_softirq+0x1c2/0x651 +... +[ 135.293613] RIP: 0010:default_idle+0xb/0x10 +[ 135.293613] RSP: 0018:ffff888006317e68 EFLAGS: 00000246 +[ 135.293613] RAX: ffffffff82ad8d10 RBX: ffff888006301cc0 RCX: ffffffff82ac90e1 +[ 135.293613] RDX: ffffed100d9ff1b4 RSI: ffffffff831ad140 RDI: ffffffff82ad8f20 +[ 135.293613] RBP: 0000000000000003 R08: 0000000000000000 R09: ffff88806cff8d9b +[ 135.293613] R10: ffffed100d9ff1b3 R11: 0000000000000001 R12: ffffffff84593410 +[ 135.293613] R13: 0000000000000000 R14: 0000000000000000 R15: 1ffff11000c62fd2 +... +[ 135.389205] usb 1-1: == mwifiex dump information to /sys/class/devcoredump end + +This patch uses delayed work to replace timer and moves the operations +that may sleep into a delayed work in order to mitigate bugs, it was +tested on Marvell 88W8801 chip whose port is usb and the firmware is +usb8801_uapsta.bin. The following is the result after using delayed +work to replace timer. + +[ 134.936453] usb 1-1: == mwifiex dump information to /sys/class/devcoredump start +[ 135.043344] usb 1-1: == mwifiex dump information to /sys/class/devcoredump end + +As we can see, there is no bug now. + +Fixes: f5ecd02a8b20 ("mwifiex: device dump support for usb interface") +Signed-off-by: Duoming Zhou +Reviewed-by: Brian Norris +Acked-by: Greg Kroah-Hartman +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/5cfa5c473ff6d069cb67760ffa04a2f84ef450a8.1661252818.git.duoming@zju.edu.cn +Acked-by: Takashi Iwai + +--- + drivers/net/wireless/marvell/mwifiex/init.c | 9 +++++---- + drivers/net/wireless/marvell/mwifiex/main.h | 3 ++- + drivers/net/wireless/marvell/mwifiex/sta_event.c | 6 +++--- + 3 files changed, 10 insertions(+), 8 deletions(-) + +diff --git a/drivers/net/wireless/marvell/mwifiex/init.c b/drivers/net/wireless/marvell/mwifiex/init.c +index fc77489cc511..7dddb4b5dea1 100644 +--- a/drivers/net/wireless/marvell/mwifiex/init.c ++++ b/drivers/net/wireless/marvell/mwifiex/init.c +@@ -51,9 +51,10 @@ static void wakeup_timer_fn(struct timer_list *t) + adapter->if_ops.card_reset(adapter); + } + +-static void fw_dump_timer_fn(struct timer_list *t) ++static void fw_dump_work(struct work_struct *work) + { +- struct mwifiex_adapter *adapter = from_timer(adapter, t, devdump_timer); ++ struct mwifiex_adapter *adapter = ++ container_of(work, struct mwifiex_adapter, devdump_work.work); + + mwifiex_upload_device_dump(adapter); + } +@@ -309,7 +310,7 @@ static void mwifiex_init_adapter(struct mwifiex_adapter *adapter) + adapter->active_scan_triggered = false; + timer_setup(&adapter->wakeup_timer, wakeup_timer_fn, 0); + adapter->devdump_len = 0; +- timer_setup(&adapter->devdump_timer, fw_dump_timer_fn, 0); ++ INIT_DELAYED_WORK(&adapter->devdump_work, fw_dump_work); + } + + /* +@@ -388,7 +389,7 @@ static void + mwifiex_adapter_cleanup(struct mwifiex_adapter *adapter) + { + del_timer(&adapter->wakeup_timer); +- del_timer_sync(&adapter->devdump_timer); ++ cancel_delayed_work_sync(&adapter->devdump_work); + mwifiex_cancel_all_pending_cmd(adapter); + wake_up_interruptible(&adapter->cmd_wait_q.wait); + wake_up_interruptible(&adapter->hs_activate_wait_q); +diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h +index 87729d251fed..63f861e6b28a 100644 +--- a/drivers/net/wireless/marvell/mwifiex/main.h ++++ b/drivers/net/wireless/marvell/mwifiex/main.h +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + + #include "decl.h" + #include "ioctl.h" +@@ -1043,7 +1044,7 @@ struct mwifiex_adapter { + /* Device dump data/length */ + void *devdump_data; + int devdump_len; +- struct timer_list devdump_timer; ++ struct delayed_work devdump_work; + + bool ignore_btcoex_events; + }; +diff --git a/drivers/net/wireless/marvell/mwifiex/sta_event.c b/drivers/net/wireless/marvell/mwifiex/sta_event.c +index b6315fccd1bb..df9cdd10a494 100644 +--- a/drivers/net/wireless/marvell/mwifiex/sta_event.c ++++ b/drivers/net/wireless/marvell/mwifiex/sta_event.c +@@ -611,8 +611,8 @@ mwifiex_fw_dump_info_event(struct mwifiex_private *priv, + * transmission event get lost, in this cornel case, + * user would still get partial of the dump. + */ +- mod_timer(&adapter->devdump_timer, +- jiffies + msecs_to_jiffies(MWIFIEX_TIMER_10S)); ++ schedule_delayed_work(&adapter->devdump_work, ++ msecs_to_jiffies(MWIFIEX_TIMER_10S)); + } + + /* Overflow check */ +@@ -631,7 +631,7 @@ mwifiex_fw_dump_info_event(struct mwifiex_private *priv, + return; + + upload_dump: +- del_timer_sync(&adapter->devdump_timer); ++ cancel_delayed_work_sync(&adapter->devdump_work); + mwifiex_upload_device_dump(adapter); + } + +-- +2.35.3 + diff --git a/patches.suse/net-thunderbolt-Enable-DMA-paths-only-after-rings-ar.patch b/patches.suse/net-thunderbolt-Enable-DMA-paths-only-after-rings-ar.patch new file mode 100644 index 0000000..739f486 --- /dev/null +++ b/patches.suse/net-thunderbolt-Enable-DMA-paths-only-after-rings-ar.patch @@ -0,0 +1,83 @@ +From ff7cd07f306406493f7b78890475e85b6d0811ed Mon Sep 17 00:00:00 2001 +From: Mika Westerberg +Date: Tue, 30 Aug 2022 18:32:46 +0300 +Subject: [PATCH] net: thunderbolt: Enable DMA paths only after rings are enabled +Git-commit: ff7cd07f306406493f7b78890475e85b6d0811ed +Patch-mainline: v6.1-rc1 +References: git-fixes + +If the other host starts sending packets early on it is possible that we +are still in the middle of populating the initial Rx ring packets to the +ring. This causes the tbnet_poll() to mess over the queue and causes +list corruption. This happens specifically when connected with macOS as +it seems start sending various IP discovery packets as soon as its side +of the paths are configured. + +To prevent this we move the DMA path enabling to happen after we have +primed the Rx ring. This makes sure no incoming packets can arrive +before we are ready to handle them. + +Fixes: e69b6c02b4c3 ("net: Add support for networking over Thunderbolt cable") +Cc: stable@vger.kernel.org +Signed-off-by: Mika Westerberg +Signed-off-by: David S. Miller +Acked-by: Takashi Iwai + +--- + drivers/net/thunderbolt.c | 28 +++++++++++++++++----------- + 1 file changed, 17 insertions(+), 11 deletions(-) + +diff --git a/drivers/net/thunderbolt.c b/drivers/net/thunderbolt.c +index ff5d0e98a088..ab3f04562980 100644 +--- a/drivers/net/thunderbolt.c ++++ b/drivers/net/thunderbolt.c +@@ -612,18 +612,13 @@ static void tbnet_connected_work(struct work_struct *work) + return; + } + +- /* Both logins successful so enable the high-speed DMA paths and +- * start the network device queue. ++ /* Both logins successful so enable the rings, high-speed DMA ++ * paths and start the network device queue. ++ * ++ * Note we enable the DMA paths last to make sure we have primed ++ * the Rx ring before any incoming packets are allowed to ++ * arrive. + */ +- ret = tb_xdomain_enable_paths(net->xd, net->local_transmit_path, +- net->rx_ring.ring->hop, +- net->remote_transmit_path, +- net->tx_ring.ring->hop); +- if (ret) { +- netdev_err(net->dev, "failed to enable DMA paths\n"); +- return; +- } +- + tb_ring_start(net->tx_ring.ring); + tb_ring_start(net->rx_ring.ring); + +@@ -635,10 +630,21 @@ static void tbnet_connected_work(struct work_struct *work) + if (ret) + goto err_free_rx_buffers; + ++ ret = tb_xdomain_enable_paths(net->xd, net->local_transmit_path, ++ net->rx_ring.ring->hop, ++ net->remote_transmit_path, ++ net->tx_ring.ring->hop); ++ if (ret) { ++ netdev_err(net->dev, "failed to enable DMA paths\n"); ++ goto err_free_tx_buffers; ++ } ++ + netif_carrier_on(net->dev); + netif_start_queue(net->dev); + return; + ++err_free_tx_buffers: ++ tbnet_free_buffers(&net->tx_ring); + err_free_rx_buffers: + tbnet_free_buffers(&net->rx_ring); + err_stop_rings: +-- +2.35.3 + diff --git a/patches.suse/net-wwan-iosm-Call-mutex_init-before-locking-it.patch b/patches.suse/net-wwan-iosm-Call-mutex_init-before-locking-it.patch new file mode 100644 index 0000000..bbcc962 --- /dev/null +++ b/patches.suse/net-wwan-iosm-Call-mutex_init-before-locking-it.patch @@ -0,0 +1,50 @@ +From ba0fbdb95da5ddd8db457ce6ba09d16dd979a294 Mon Sep 17 00:00:00 2001 +From: Maxim Mikityanskiy +Date: Sat, 1 Oct 2022 13:57:13 +0300 +Subject: [PATCH] net: wwan: iosm: Call mutex_init before locking it +Git-commit: ba0fbdb95da5ddd8db457ce6ba09d16dd979a294 +Patch-mainline: v6.1-rc1 +References: git-fixes + +wwan_register_ops calls wwan_create_default_link, which ends up in the +ipc_wwan_newlink callback that locks ipc_wwan->if_mutex. However, this +mutex is not yet initialized by that point. Fix it by moving mutex_init +above the wwan_register_ops call. This also makes the order of +operations in ipc_wwan_init symmetric to ipc_wwan_deinit. + +Fixes: 83068395bbfc ("net: iosm: create default link via WWAN core") +Signed-off-by: Maxim Mikityanskiy +Reviewed-by: M Chetan Kumar +Signed-off-by: David S. Miller +Acked-by: Takashi Iwai + +--- + drivers/net/wwan/iosm/iosm_ipc_wwan.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/wwan/iosm/iosm_ipc_wwan.c b/drivers/net/wwan/iosm/iosm_ipc_wwan.c +index 27151148c782..4712f01a7e33 100644 +--- a/drivers/net/wwan/iosm/iosm_ipc_wwan.c ++++ b/drivers/net/wwan/iosm/iosm_ipc_wwan.c +@@ -323,15 +323,16 @@ struct iosm_wwan *ipc_wwan_init(struct iosm_imem *ipc_imem, struct device *dev) + ipc_wwan->dev = dev; + ipc_wwan->ipc_imem = ipc_imem; + ++ mutex_init(&ipc_wwan->if_mutex); ++ + /* WWAN core will create a netdev for the default IP MUX channel */ + if (wwan_register_ops(ipc_wwan->dev, &iosm_wwan_ops, ipc_wwan, + IP_MUX_SESSION_DEFAULT)) { ++ mutex_destroy(&ipc_wwan->if_mutex); + kfree(ipc_wwan); + return NULL; + } + +- mutex_init(&ipc_wwan->if_mutex); +- + return ipc_wwan; + } + +-- +2.35.3 + diff --git a/patches.suse/regulator-qcom_rpm-Fix-circular-deferral-regression.patch b/patches.suse/regulator-qcom_rpm-Fix-circular-deferral-regression.patch new file mode 100644 index 0000000..fa35cc7 --- /dev/null +++ b/patches.suse/regulator-qcom_rpm-Fix-circular-deferral-regression.patch @@ -0,0 +1,104 @@ +From 8478ed5844588703a1a4c96a004b1525fbdbdd5e Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Fri, 9 Sep 2022 13:25:29 +0200 +Subject: [PATCH] regulator: qcom_rpm: Fix circular deferral regression +Git-commit: 8478ed5844588703a1a4c96a004b1525fbdbdd5e +Patch-mainline: v6.1-rc1 +References: git-fixes + +On recent kernels, the PM8058 L16 (or any other PM8058 LDO-regulator) +does not come up if they are supplied by an SMPS-regulator. This +is not very strange since the regulators are registered in a long +array and the L-regulators are registered before the S-regulators, +and if an L-regulator defers, it will never get around to registering +the S-regulator that it needs. + +See arch/arm/boot/dts/qcom-apq8060-dragonboard.dts: + +pm8058-regulators { + (...) + vdd_l13_l16-supply = <&pm8058_s4>; + (...) + +Ooops. + +Fix this by moving the PM8058 S-regulators first in the array. + +Do the same for the PM8901 S-regulators (though this is currently +not causing any problems with out device trees) so that the pattern +of registration order is the same on all PMnnnn chips. + +Fixes: 087a1b5cdd55 ("regulator: qcom: Rework to single platform device") +Cc: stable@vger.kernel.org +Cc: Andy Gross +Cc: Bjorn Andersson +Cc: Konrad Dybcio +Cc: linux-arm-msm@vger.kernel.org +Signed-off-by: Linus Walleij +Link: https://lore.kernel.org/r/20220909112529.239143-1-linus.walleij@linaro.org +Signed-off-by: Mark Brown +Acked-by: Takashi Iwai + +--- + drivers/regulator/qcom_rpm-regulator.c | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/drivers/regulator/qcom_rpm-regulator.c b/drivers/regulator/qcom_rpm-regulator.c +index 7f9d66ac37ff..3c41b71a1f52 100644 +--- a/drivers/regulator/qcom_rpm-regulator.c ++++ b/drivers/regulator/qcom_rpm-regulator.c +@@ -802,6 +802,12 @@ static const struct rpm_regulator_data rpm_pm8018_regulators[] = { + }; + + static const struct rpm_regulator_data rpm_pm8058_regulators[] = { ++ { "s0", QCOM_RPM_PM8058_SMPS0, &pm8058_smps, "vdd_s0" }, ++ { "s1", QCOM_RPM_PM8058_SMPS1, &pm8058_smps, "vdd_s1" }, ++ { "s2", QCOM_RPM_PM8058_SMPS2, &pm8058_smps, "vdd_s2" }, ++ { "s3", QCOM_RPM_PM8058_SMPS3, &pm8058_smps, "vdd_s3" }, ++ { "s4", QCOM_RPM_PM8058_SMPS4, &pm8058_smps, "vdd_s4" }, ++ + { "l0", QCOM_RPM_PM8058_LDO0, &pm8058_nldo, "vdd_l0_l1_lvs" }, + { "l1", QCOM_RPM_PM8058_LDO1, &pm8058_nldo, "vdd_l0_l1_lvs" }, + { "l2", QCOM_RPM_PM8058_LDO2, &pm8058_pldo, "vdd_l2_l11_l12" }, +@@ -829,12 +835,6 @@ static const struct rpm_regulator_data rpm_pm8058_regulators[] = { + { "l24", QCOM_RPM_PM8058_LDO24, &pm8058_nldo, "vdd_l23_l24_l25" }, + { "l25", QCOM_RPM_PM8058_LDO25, &pm8058_nldo, "vdd_l23_l24_l25" }, + +- { "s0", QCOM_RPM_PM8058_SMPS0, &pm8058_smps, "vdd_s0" }, +- { "s1", QCOM_RPM_PM8058_SMPS1, &pm8058_smps, "vdd_s1" }, +- { "s2", QCOM_RPM_PM8058_SMPS2, &pm8058_smps, "vdd_s2" }, +- { "s3", QCOM_RPM_PM8058_SMPS3, &pm8058_smps, "vdd_s3" }, +- { "s4", QCOM_RPM_PM8058_SMPS4, &pm8058_smps, "vdd_s4" }, +- + { "lvs0", QCOM_RPM_PM8058_LVS0, &pm8058_switch, "vdd_l0_l1_lvs" }, + { "lvs1", QCOM_RPM_PM8058_LVS1, &pm8058_switch, "vdd_l0_l1_lvs" }, + +@@ -843,6 +843,12 @@ static const struct rpm_regulator_data rpm_pm8058_regulators[] = { + }; + + static const struct rpm_regulator_data rpm_pm8901_regulators[] = { ++ { "s0", QCOM_RPM_PM8901_SMPS0, &pm8901_ftsmps, "vdd_s0" }, ++ { "s1", QCOM_RPM_PM8901_SMPS1, &pm8901_ftsmps, "vdd_s1" }, ++ { "s2", QCOM_RPM_PM8901_SMPS2, &pm8901_ftsmps, "vdd_s2" }, ++ { "s3", QCOM_RPM_PM8901_SMPS3, &pm8901_ftsmps, "vdd_s3" }, ++ { "s4", QCOM_RPM_PM8901_SMPS4, &pm8901_ftsmps, "vdd_s4" }, ++ + { "l0", QCOM_RPM_PM8901_LDO0, &pm8901_nldo, "vdd_l0" }, + { "l1", QCOM_RPM_PM8901_LDO1, &pm8901_pldo, "vdd_l1" }, + { "l2", QCOM_RPM_PM8901_LDO2, &pm8901_pldo, "vdd_l2" }, +@@ -851,12 +857,6 @@ static const struct rpm_regulator_data rpm_pm8901_regulators[] = { + { "l5", QCOM_RPM_PM8901_LDO5, &pm8901_pldo, "vdd_l5" }, + { "l6", QCOM_RPM_PM8901_LDO6, &pm8901_pldo, "vdd_l6" }, + +- { "s0", QCOM_RPM_PM8901_SMPS0, &pm8901_ftsmps, "vdd_s0" }, +- { "s1", QCOM_RPM_PM8901_SMPS1, &pm8901_ftsmps, "vdd_s1" }, +- { "s2", QCOM_RPM_PM8901_SMPS2, &pm8901_ftsmps, "vdd_s2" }, +- { "s3", QCOM_RPM_PM8901_SMPS3, &pm8901_ftsmps, "vdd_s3" }, +- { "s4", QCOM_RPM_PM8901_SMPS4, &pm8901_ftsmps, "vdd_s4" }, +- + { "lvs0", QCOM_RPM_PM8901_LVS0, &pm8901_switch, "lvs0_in" }, + { "lvs1", QCOM_RPM_PM8901_LVS1, &pm8901_switch, "lvs1_in" }, + { "lvs2", QCOM_RPM_PM8901_LVS2, &pm8901_switch, "lvs2_in" }, +-- +2.35.3 + diff --git a/patches.suse/spi-dw-Fix-PM-disable-depth-imbalance-in-dw_spi_bt1_.patch b/patches.suse/spi-dw-Fix-PM-disable-depth-imbalance-in-dw_spi_bt1_.patch new file mode 100644 index 0000000..4f30fec --- /dev/null +++ b/patches.suse/spi-dw-Fix-PM-disable-depth-imbalance-in-dw_spi_bt1_.patch @@ -0,0 +1,42 @@ +From 618d815fc93477b1675878f3c04ff32657cc18b4 Mon Sep 17 00:00:00 2001 +From: Zhang Qilong +Date: Sat, 24 Sep 2022 20:13:08 +0800 +Subject: [PATCH] spi: dw: Fix PM disable depth imbalance in dw_spi_bt1_probe +Git-commit: 618d815fc93477b1675878f3c04ff32657cc18b4 +Patch-mainline: v6.1-rc1 +References: git-fixes + +The pm_runtime_enable will increase power disable depth. Thus +a pairing decrement is needed on the error handling path to +keep it balanced according to context. + +Fixes:abf00907538e2 ("spi: dw: Add Baikal-T1 SPI Controller glue driver") + +Signed-off-by: Zhang Qilong +Link: https://lore.kernel.org/r/20220924121310.78331-3-zhangqilong3@huawei.com +Signed-off-by: Mark Brown +Acked-by: Takashi Iwai + +--- + drivers/spi/spi-dw-bt1.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/spi/spi-dw-bt1.c b/drivers/spi/spi-dw-bt1.c +index c06553416123..3fb89dee595e 100644 +--- a/drivers/spi/spi-dw-bt1.c ++++ b/drivers/spi/spi-dw-bt1.c +@@ -293,8 +293,10 @@ static int dw_spi_bt1_probe(struct platform_device *pdev) + pm_runtime_enable(&pdev->dev); + + ret = dw_spi_add_host(&pdev->dev, dws); +- if (ret) ++ if (ret) { ++ pm_runtime_disable(&pdev->dev); + goto err_disable_clk; ++ } + + platform_set_drvdata(pdev, dwsbt1); + +-- +2.35.3 + diff --git a/patches.suse/spi-meson-spicc-do-not-rely-on-busy-flag-in-pow2-clk.patch b/patches.suse/spi-meson-spicc-do-not-rely-on-busy-flag-in-pow2-clk.patch new file mode 100644 index 0000000..a80fa36 --- /dev/null +++ b/patches.suse/spi-meson-spicc-do-not-rely-on-busy-flag-in-pow2-clk.patch @@ -0,0 +1,66 @@ +From 36acf80fc0c4b5ebe6fa010b524d442ee7f08fd3 Mon Sep 17 00:00:00 2001 +From: Neil Armstrong +Date: Thu, 8 Sep 2022 14:18:03 +0200 +Subject: [PATCH] spi: meson-spicc: do not rely on busy flag in pow2 clk ops +Git-commit: 36acf80fc0c4b5ebe6fa010b524d442ee7f08fd3 +Patch-mainline: v6.1-rc1 +References: git-fixes + +Since [1], controller's busy flag isn't set anymore when the +__spi_transfer_message_noqueue() is used instead of the +__spi_pump_transfer_message() logic for spi_sync transfers. + +Since the pow2 clock ops were limited to only be available when a +transfer is ongoing (between prepare_transfer_hardware and +unprepare_transfer_hardware callbacks), the only way to track this +down is to check for the controller cur_msg. + +[1] ae7d2346dc89 ("spi: Don't use the message queue if possible in spi_sync") + +Fixes: 09992025dacd ("spi: meson-spicc: add local pow2 clock ops to preserve rate between messages") +Fixes: ae7d2346dc89 ("spi: Don't use the message queue if possible in spi_sync") +Reported-by: Markus Schneider-Pargmann +Signed-off-by: Neil Armstrong +Tested-by: Markus Schneider-Pargmann +Link: https://lore.kernel.org/r/20220908121803.919943-1-narmstrong@baylibre.com +Signed-off-by: Mark Brown +Acked-by: Takashi Iwai + +--- + drivers/spi/spi-meson-spicc.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/spi/spi-meson-spicc.c b/drivers/spi/spi-meson-spicc.c +index e4cb52e1fe26..6974a1c947aa 100644 +--- a/drivers/spi/spi-meson-spicc.c ++++ b/drivers/spi/spi-meson-spicc.c +@@ -537,7 +537,7 @@ static unsigned long meson_spicc_pow2_recalc_rate(struct clk_hw *hw, + struct clk_divider *divider = to_clk_divider(hw); + struct meson_spicc_device *spicc = pow2_clk_to_spicc(divider); + +- if (!spicc->master->cur_msg || !spicc->master->busy) ++ if (!spicc->master->cur_msg) + return 0; + + return clk_divider_ops.recalc_rate(hw, parent_rate); +@@ -549,7 +549,7 @@ static int meson_spicc_pow2_determine_rate(struct clk_hw *hw, + struct clk_divider *divider = to_clk_divider(hw); + struct meson_spicc_device *spicc = pow2_clk_to_spicc(divider); + +- if (!spicc->master->cur_msg || !spicc->master->busy) ++ if (!spicc->master->cur_msg) + return -EINVAL; + + return clk_divider_ops.determine_rate(hw, req); +@@ -561,7 +561,7 @@ static int meson_spicc_pow2_set_rate(struct clk_hw *hw, unsigned long rate, + struct clk_divider *divider = to_clk_divider(hw); + struct meson_spicc_device *spicc = pow2_clk_to_spicc(divider); + +- if (!spicc->master->cur_msg || !spicc->master->busy) ++ if (!spicc->master->cur_msg) + return -EINVAL; + + return clk_divider_ops.set_rate(hw, rate, parent_rate); +-- +2.35.3 + diff --git a/patches.suse/spi-mt7621-Fix-an-error-message-in-mt7621_spi_probe.patch b/patches.suse/spi-mt7621-Fix-an-error-message-in-mt7621_spi_probe.patch new file mode 100644 index 0000000..e8fc261 --- /dev/null +++ b/patches.suse/spi-mt7621-Fix-an-error-message-in-mt7621_spi_probe.patch @@ -0,0 +1,48 @@ +From 2b2bf6b7faa9010fae10dc7de76627a3fdb525b3 Mon Sep 17 00:00:00 2001 +From: Christophe JAILLET +Date: Sat, 27 Aug 2022 13:42:07 +0200 +Subject: [PATCH] spi: mt7621: Fix an error message in mt7621_spi_probe() +Git-commit: 2b2bf6b7faa9010fae10dc7de76627a3fdb525b3 +Patch-mainline: v6.1-rc1 +References: git-fixes + +'status' is known to be 0 at this point. The expected error code is +PTR_ERR(clk). + +Switch to dev_err_probe() in order to display the expected error code (in a +human readable way). +This also filters -EPROBE_DEFER cases, should it happen. + +Fixes: 1ab7f2a43558 ("staging: mt7621-spi: add mt7621 support") +Signed-off-by: Christophe JAILLET +Reviewed-by: Matthias Brugger +Link: https://lore.kernel.org/r/928f3fb507d53ba0774df27cea0bbba4b055993b.1661599671.git.christophe.jaillet@wanadoo.fr +Signed-off-by: Mark Brown +Acked-by: Takashi Iwai + +--- + drivers/spi/spi-mt7621.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/drivers/spi/spi-mt7621.c b/drivers/spi/spi-mt7621.c +index b4b9b7309b5e..351b0ef52bbc 100644 +--- a/drivers/spi/spi-mt7621.c ++++ b/drivers/spi/spi-mt7621.c +@@ -340,11 +340,9 @@ static int mt7621_spi_probe(struct platform_device *pdev) + return PTR_ERR(base); + + clk = devm_clk_get(&pdev->dev, NULL); +- if (IS_ERR(clk)) { +- dev_err(&pdev->dev, "unable to get SYS clock, err=%d\n", +- status); +- return PTR_ERR(clk); +- } ++ if (IS_ERR(clk)) ++ return dev_err_probe(&pdev->dev, PTR_ERR(clk), ++ "unable to get SYS clock\n"); + + status = clk_prepare_enable(clk); + if (status) +-- +2.35.3 + diff --git a/patches.suse/spi-omap100k-Fix-PM-disable-depth-imbalance-in-omap1.patch b/patches.suse/spi-omap100k-Fix-PM-disable-depth-imbalance-in-omap1.patch new file mode 100644 index 0000000..cf133d2 --- /dev/null +++ b/patches.suse/spi-omap100k-Fix-PM-disable-depth-imbalance-in-omap1.patch @@ -0,0 +1,38 @@ +From 29f65f2171c85a9633daa380df14009a365f42f2 Mon Sep 17 00:00:00 2001 +From: Zhang Qilong +Date: Sat, 24 Sep 2022 20:13:09 +0800 +Subject: [PATCH] spi/omap100k:Fix PM disable depth imbalance in omap1_spi100k_probe +Git-commit: 29f65f2171c85a9633daa380df14009a365f42f2 +Patch-mainline: v6.1-rc1 +References: git-fixes + +The pm_runtime_enable will increase power disable depth. Thus +a pairing decrement is needed on the error handling path to +keep it balanced according to context. + +Fixes:db91841b58f9a ("spi/omap100k: Convert to runtime PM") + +Signed-off-by: Zhang Qilong +Link: https://lore.kernel.org/r/20220924121310.78331-4-zhangqilong3@huawei.com +Signed-off-by: Mark Brown +Acked-by: Takashi Iwai + +--- + drivers/spi/spi-omap-100k.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c +index 20b047172965..061f7394e5b9 100644 +--- a/drivers/spi/spi-omap-100k.c ++++ b/drivers/spi/spi-omap-100k.c +@@ -412,6 +412,7 @@ static int omap1_spi100k_probe(struct platform_device *pdev) + return status; + + err_fck: ++ pm_runtime_disable(&pdev->dev); + clk_disable_unprepare(spi100k->fck); + err_ick: + clk_disable_unprepare(spi100k->ick); +-- +2.35.3 + diff --git a/patches.suse/spi-qup-add-missing-clk_disable_unprepare-on-error-i-494a22765ce4.patch b/patches.suse/spi-qup-add-missing-clk_disable_unprepare-on-error-i-494a22765ce4.patch new file mode 100644 index 0000000..b98c8df --- /dev/null +++ b/patches.suse/spi-qup-add-missing-clk_disable_unprepare-on-error-i-494a22765ce4.patch @@ -0,0 +1,43 @@ +From 494a22765ce479c9f8ad181c5d24cffda9f534bb Mon Sep 17 00:00:00 2001 +From: Xu Qiang +Date: Thu, 25 Aug 2022 06:53:24 +0000 +Subject: [PATCH] spi: qup: add missing clk_disable_unprepare on error in spi_qup_pm_resume_runtime() +Mime-version: 1.0 +Content-type: text/plain; charset=UTF-8 +Content-transfer-encoding: 8bit +Git-commit: 494a22765ce479c9f8ad181c5d24cffda9f534bb +Patch-mainline: v6.1-rc1 +References: git-fixes + +Add the missing clk_disable_unprepare() before return +from spi_qup_pm_resume_runtime() in the error handling case. + +Fixes: dae1a7700b34 (“spi: qup: Handle clocks in pm_runtime suspend and resume”) +Signed-off-by: Xu Qiang +Link: https://lore.kernel.org/r/20220825065324.68446-2-xuqiang36@huawei.com +Signed-off-by: Mark Brown +Acked-by: Takashi Iwai + +--- + drivers/spi/spi-qup.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c +index ae4e67f152ec..7d89510dc3f0 100644 +--- a/drivers/spi/spi-qup.c ++++ b/drivers/spi/spi-qup.c +@@ -1198,8 +1198,10 @@ static int spi_qup_pm_resume_runtime(struct device *device) + return ret; + + ret = clk_prepare_enable(controller->cclk); +- if (ret) ++ if (ret) { ++ clk_disable_unprepare(controller->iclk); + return ret; ++ } + + /* Disable clocks auto gaiting */ + config = readl_relaxed(controller->base + QUP_CONFIG); +-- +2.35.3 + diff --git a/patches.suse/spi-qup-add-missing-clk_disable_unprepare-on-error-i.patch b/patches.suse/spi-qup-add-missing-clk_disable_unprepare-on-error-i.patch new file mode 100644 index 0000000..e846954 --- /dev/null +++ b/patches.suse/spi-qup-add-missing-clk_disable_unprepare-on-error-i.patch @@ -0,0 +1,60 @@ +From 70034320fdc597b8f58b4a43bb547f17c4c5557a Mon Sep 17 00:00:00 2001 +From: Xu Qiang +Date: Thu, 25 Aug 2022 06:53:23 +0000 +Subject: [PATCH] spi: qup: add missing clk_disable_unprepare on error in spi_qup_resume() +Mime-version: 1.0 +Content-type: text/plain; charset=UTF-8 +Content-transfer-encoding: 8bit +Git-commit: 70034320fdc597b8f58b4a43bb547f17c4c5557a +Patch-mainline: v6.1-rc1 +References: git-fixes + +Add the missing clk_disable_unprepare() before return +from spi_qup_resume() in the error handling case. + +Fixes: 64ff247a978f (“spi: Add Qualcomm QUP SPI controller support”) +Signed-off-by: Xu Qiang +Link: https://lore.kernel.org/r/20220825065324.68446-1-xuqiang36@huawei.com +Signed-off-by: Mark Brown +Acked-by: Takashi Iwai + +--- + drivers/spi/spi-qup.c | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) + +diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c +index 00d6084306b4..ae4e67f152ec 100644 +--- a/drivers/spi/spi-qup.c ++++ b/drivers/spi/spi-qup.c +@@ -1245,14 +1245,25 @@ static int spi_qup_resume(struct device *device) + return ret; + + ret = clk_prepare_enable(controller->cclk); +- if (ret) ++ if (ret) { ++ clk_disable_unprepare(controller->iclk); + return ret; ++ } + + ret = spi_qup_set_state(controller, QUP_STATE_RESET); + if (ret) +- return ret; ++ goto disable_clk; ++ ++ ret = spi_master_resume(master); ++ if (ret) ++ goto disable_clk; + +- return spi_master_resume(master); ++ return 0; ++ ++disable_clk: ++ clk_disable_unprepare(controller->cclk); ++ clk_disable_unprepare(controller->iclk); ++ return ret; + } + #endif /* CONFIG_PM_SLEEP */ + +-- +2.35.3 + diff --git a/patches.suse/spi-s3c64xx-Fix-large-transfers-with-DMA.patch b/patches.suse/spi-s3c64xx-Fix-large-transfers-with-DMA.patch new file mode 100644 index 0000000..865ece6 --- /dev/null +++ b/patches.suse/spi-s3c64xx-Fix-large-transfers-with-DMA.patch @@ -0,0 +1,55 @@ +From 1224e29572f655facfcd850cf0f0a4784f36a903 Mon Sep 17 00:00:00 2001 +From: Vincent Whitchurch +Date: Tue, 27 Sep 2022 13:21:17 +0200 +Subject: [PATCH] spi: s3c64xx: Fix large transfers with DMA +Git-commit: 1224e29572f655facfcd850cf0f0a4784f36a903 +Patch-mainline: v6.1-rc1 +References: git-fixes + +The COUNT_VALUE in the PACKET_CNT register is 16-bit so the maximum +value is 65535. Asking the driver to transfer a larger size currently +leads to the DMA transfer timing out. Implement ->max_transfer_size() +and have the core split the transfer as needed. + +Fixes: 230d42d422e7 ("spi: Add s3c64xx SPI Controller driver") +Signed-off-by: Vincent Whitchurch +Link: https://lore.kernel.org/r/20220927112117.77599-5-vincent.whitchurch@axis.com +Signed-off-by: Mark Brown +Acked-by: Takashi Iwai + +--- + drivers/spi/spi-s3c64xx.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/drivers/spi/spi-s3c64xx.c ++++ b/drivers/spi/spi-s3c64xx.c +@@ -85,6 +85,7 @@ + #define S3C64XX_SPI_ST_TX_FIFORDY (1<<0) + + #define S3C64XX_SPI_PACKET_CNT_EN (1<<16) ++#define S3C64XX_SPI_PACKET_CNT_MASK GENMASK(15, 0) + + #define S3C64XX_SPI_PND_TX_UNDERRUN_CLR (1<<4) + #define S3C64XX_SPI_PND_TX_OVERRUN_CLR (1<<3) +@@ -661,6 +662,13 @@ static int s3c64xx_spi_prepare_message(s + return 0; + } + ++static size_t s3c64xx_spi_max_transfer_size(struct spi_device *spi) ++{ ++ struct spi_controller *ctlr = spi->controller; ++ ++ return ctlr->can_dma ? S3C64XX_SPI_PACKET_CNT_MASK : SIZE_MAX; ++} ++ + static int s3c64xx_spi_transfer_one(struct spi_master *master, + struct spi_device *spi, + struct spi_transfer *xfer) +@@ -1130,6 +1138,7 @@ static int s3c64xx_spi_probe(struct plat + master->prepare_transfer_hardware = s3c64xx_spi_prepare_transfer; + master->prepare_message = s3c64xx_spi_prepare_message; + master->transfer_one = s3c64xx_spi_transfer_one; ++ master->max_transfer_size = s3c64xx_spi_max_transfer_size; + master->num_chipselect = sci->num_cs; + master->dma_alignment = 8; + master->bits_per_word_mask = SPI_BPW_MASK(32) | SPI_BPW_MASK(16) | diff --git a/patches.suse/vhost-vsock-Use-kvmalloc-kvfree-for-larger-packets.patch b/patches.suse/vhost-vsock-Use-kvmalloc-kvfree-for-larger-packets.patch new file mode 100644 index 0000000..420136b --- /dev/null +++ b/patches.suse/vhost-vsock-Use-kvmalloc-kvfree-for-larger-packets.patch @@ -0,0 +1,73 @@ +From 0e3f72931fc47bb81686020cc643cde5d9cd0bb8 Mon Sep 17 00:00:00 2001 +From: Junichi Uekawa +Date: Wed, 28 Sep 2022 15:45:38 +0900 +Subject: [PATCH] vhost/vsock: Use kvmalloc/kvfree for larger packets. +Git-commit: 0e3f72931fc47bb81686020cc643cde5d9cd0bb8 +Patch-mainline: v6.1-rc1 +References: git-fixes + +When copying a large file over sftp over vsock, data size is usually 32kB, +and kmalloc seems to fail to try to allocate 32 32kB regions. + + vhost-5837: page allocation failure: order:4, mode:0x24040c0 + Call Trace: + [] dump_stack+0x97/0xdb + [] warn_alloc_failed+0x10f/0x138 + [] ? __alloc_pages_direct_compact+0x38/0xc8 + [] __alloc_pages_nodemask+0x84c/0x90d + [] alloc_kmem_pages+0x17/0x19 + [] kmalloc_order_trace+0x2b/0xdb + [] __kmalloc+0x177/0x1f7 + [] ? copy_from_iter+0x8d/0x31d + [] vhost_vsock_handle_tx_kick+0x1fa/0x301 [vhost_vsock] + [] vhost_worker+0xf7/0x157 [vhost] + [] kthread+0xfd/0x105 + [] ? vhost_dev_set_owner+0x22e/0x22e [vhost] + [] ? flush_kthread_worker+0xf3/0xf3 + [] ret_from_fork+0x4e/0x80 + [] ? flush_kthread_worker+0xf3/0xf3 + +Work around by doing kvmalloc instead. + +Fixes: 433fc58e6bf2 ("VSOCK: Introduce vhost_vsock.ko") +Signed-off-by: Junichi Uekawa +Reviewed-by: Stefano Garzarella +Acked-by: Michael S. Tsirkin +Link: https://lore.kernel.org/r/20220928064538.667678-1-uekawa@chromium.org +Signed-off-by: Jakub Kicinski +Acked-by: Takashi Iwai + +--- + drivers/vhost/vsock.c | 2 +- + net/vmw_vsock/virtio_transport_common.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c +index 368330417bde..5703775af129 100644 +--- a/drivers/vhost/vsock.c ++++ b/drivers/vhost/vsock.c +@@ -393,7 +393,7 @@ vhost_vsock_alloc_pkt(struct vhost_virtqueue *vq, + return NULL; + } + +- pkt->buf = kmalloc(pkt->len, GFP_KERNEL); ++ pkt->buf = kvmalloc(pkt->len, GFP_KERNEL); + if (!pkt->buf) { + kfree(pkt); + return NULL; +diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c +index ec2c2afbf0d0..3a12aee33e92 100644 +--- a/net/vmw_vsock/virtio_transport_common.c ++++ b/net/vmw_vsock/virtio_transport_common.c +@@ -1342,7 +1342,7 @@ EXPORT_SYMBOL_GPL(virtio_transport_recv_pkt); + + void virtio_transport_free_pkt(struct virtio_vsock_pkt *pkt) + { +- kfree(pkt->buf); ++ kvfree(pkt->buf); + kfree(pkt); + } + EXPORT_SYMBOL_GPL(virtio_transport_free_pkt); +-- +2.35.3 + diff --git a/patches.suse/wifi-ath10k-add-peer-map-clean-up-for-peer-delete-in.patch b/patches.suse/wifi-ath10k-add-peer-map-clean-up-for-peer-delete-in.patch new file mode 100644 index 0000000..5572d04 --- /dev/null +++ b/patches.suse/wifi-ath10k-add-peer-map-clean-up-for-peer-delete-in.patch @@ -0,0 +1,205 @@ +From f020d9570a04df0762a2ac5c50cf1d8c511c9164 Mon Sep 17 00:00:00 2001 +From: Wen Gong +Date: Mon, 1 Aug 2022 10:19:30 -0400 +Subject: [PATCH] wifi: ath10k: add peer map clean up for peer delete in ath10k_sta_state() +Git-commit: f020d9570a04df0762a2ac5c50cf1d8c511c9164 +Patch-mainline: v6.1-rc1 +References: git-fixes + +When peer delete failed in a disconnect operation, use-after-free +detected by KFENCE in below log. It is because for each vdev_id and +address, it has only one struct ath10k_peer, it is allocated in +ath10k_peer_map_event(). When connected to an AP, it has more than +one HTT_T2H_MSG_TYPE_PEER_MAP reported from firmware, then the +array peer_map of struct ath10k will be set muti-elements to the +same ath10k_peer in ath10k_peer_map_event(). When peer delete failed +in ath10k_sta_state(), the ath10k_peer will be free for the 1st peer +id in array peer_map of struct ath10k, and then use-after-free happened +for the 2nd peer id because they map to the same ath10k_peer. + +And clean up all peers in array peer_map for the ath10k_peer, then +user-after-free disappeared + +peer map event log: +[ 306.911021] wlan0: authenticate with b0:2a:43:e6:75:0e +[ 306.957187] ath10k_pci 0000:01:00.0: mac vdev 0 peer create b0:2a:43:e6:75:0e (new sta) sta 1 / 32 peer 1 / 33 +[ 306.957395] ath10k_pci 0000:01:00.0: htt peer map vdev 0 peer b0:2a:43:e6:75:0e id 246 +[ 306.957404] ath10k_pci 0000:01:00.0: htt peer map vdev 0 peer b0:2a:43:e6:75:0e id 198 +[ 306.986924] ath10k_pci 0000:01:00.0: htt peer map vdev 0 peer b0:2a:43:e6:75:0e id 166 + +peer unmap event log: +[ 435.715691] wlan0: deauthenticating from b0:2a:43:e6:75:0e by local choice (Reason: 3=DEAUTH_LEAVING) +[ 435.716802] ath10k_pci 0000:01:00.0: mac vdev 0 peer delete b0:2a:43:e6:75:0e sta ffff990e0e9c2b50 (sta gone) +[ 435.717177] ath10k_pci 0000:01:00.0: htt peer unmap vdev 0 peer b0:2a:43:e6:75:0e id 246 +[ 435.717186] ath10k_pci 0000:01:00.0: htt peer unmap vdev 0 peer b0:2a:43:e6:75:0e id 198 +[ 435.717193] ath10k_pci 0000:01:00.0: htt peer unmap vdev 0 peer b0:2a:43:e6:75:0e id 166 + +use-after-free log: +[21705.888627] wlan0: deauthenticating from d0:76:8f:82:be:75 by local choice (Reason: 3=DEAUTH_LEAVING) +[21713.799910] ath10k_pci 0000:01:00.0: failed to delete peer d0:76:8f:82:be:75 for vdev 0: -110 +[21713.799925] ath10k_pci 0000:01:00.0: found sta peer d0:76:8f:82:be:75 (ptr 0000000000000000 id 102) entry on vdev 0 after it was supposedly removed +[21713.799968] ================================================================== +[21713.799991] BUG: KFENCE: use-after-free read in ath10k_sta_state+0x265/0xb8a [ath10k_core] +[21713.799991] +[21713.799997] Use-after-free read at 0x00000000abe1c75e (in kfence-#69): +[21713.800010] ath10k_sta_state+0x265/0xb8a [ath10k_core] +[21713.800041] drv_sta_state+0x115/0x677 [mac80211] +[21713.800059] __sta_info_destroy_part2+0xb1/0x133 [mac80211] +[21713.800076] __sta_info_flush+0x11d/0x162 [mac80211] +[21713.800093] ieee80211_set_disassoc+0x12d/0x2f4 [mac80211] +[21713.800110] ieee80211_mgd_deauth+0x26c/0x29b [mac80211] +[21713.800137] cfg80211_mlme_deauth+0x13f/0x1bb [cfg80211] +[21713.800153] nl80211_deauthenticate+0xf8/0x121 [cfg80211] +[21713.800161] genl_rcv_msg+0x38e/0x3be +[21713.800166] netlink_rcv_skb+0x89/0xf7 +[21713.800171] genl_rcv+0x28/0x36 +[21713.800176] netlink_unicast+0x179/0x24b +[21713.800181] netlink_sendmsg+0x3a0/0x40e +[21713.800187] sock_sendmsg+0x72/0x76 +[21713.800192] ____sys_sendmsg+0x16d/0x1e3 +[21713.800196] ___sys_sendmsg+0x95/0xd1 +[21713.800200] __sys_sendmsg+0x85/0xbf +[21713.800205] do_syscall_64+0x43/0x55 +[21713.800210] entry_SYSCALL_64_after_hwframe+0x44/0xa9 +[21713.800213] +[21713.800219] kfence-#69: 0x000000009149b0d5-0x000000004c0697fb, size=1064, cache=kmalloc-2k +[21713.800219] +[21713.800224] allocated by task 13 on cpu 0 at 21705.501373s: +[21713.800241] ath10k_peer_map_event+0x7e/0x154 [ath10k_core] +[21713.800254] ath10k_htt_t2h_msg_handler+0x586/0x1039 [ath10k_core] +[21713.800265] ath10k_htt_htc_t2h_msg_handler+0x12/0x28 [ath10k_core] +[21713.800277] ath10k_htc_rx_completion_handler+0x14c/0x1b5 [ath10k_core] +[21713.800283] ath10k_pci_process_rx_cb+0x195/0x1df [ath10k_pci] +[21713.800294] ath10k_ce_per_engine_service+0x55/0x74 [ath10k_core] +[21713.800305] ath10k_ce_per_engine_service_any+0x76/0x84 [ath10k_core] +[21713.800310] ath10k_pci_napi_poll+0x49/0x144 [ath10k_pci] +[21713.800316] net_rx_action+0xdc/0x361 +[21713.800320] __do_softirq+0x163/0x29a +[21713.800325] asm_call_irq_on_stack+0x12/0x20 +[21713.800331] do_softirq_own_stack+0x3c/0x48 +[21713.800337] __irq_exit_rcu+0x9b/0x9d +[21713.800342] common_interrupt+0xc9/0x14d +[21713.800346] asm_common_interrupt+0x1e/0x40 +[21713.800351] ksoftirqd_should_run+0x5/0x16 +[21713.800357] smpboot_thread_fn+0x148/0x211 +[21713.800362] kthread+0x150/0x15f +[21713.800367] ret_from_fork+0x22/0x30 +[21713.800370] +[21713.800374] freed by task 708 on cpu 1 at 21713.799953s: +[21713.800498] ath10k_sta_state+0x2c6/0xb8a [ath10k_core] +[21713.800515] drv_sta_state+0x115/0x677 [mac80211] +[21713.800532] __sta_info_destroy_part2+0xb1/0x133 [mac80211] +[21713.800548] __sta_info_flush+0x11d/0x162 [mac80211] +[21713.800565] ieee80211_set_disassoc+0x12d/0x2f4 [mac80211] +[21713.800581] ieee80211_mgd_deauth+0x26c/0x29b [mac80211] +[21713.800598] cfg80211_mlme_deauth+0x13f/0x1bb [cfg80211] +[21713.800614] nl80211_deauthenticate+0xf8/0x121 [cfg80211] +[21713.800619] genl_rcv_msg+0x38e/0x3be +[21713.800623] netlink_rcv_skb+0x89/0xf7 +[21713.800628] genl_rcv+0x28/0x36 +[21713.800632] netlink_unicast+0x179/0x24b +[21713.800637] netlink_sendmsg+0x3a0/0x40e +[21713.800642] sock_sendmsg+0x72/0x76 +[21713.800646] ____sys_sendmsg+0x16d/0x1e3 +[21713.800651] ___sys_sendmsg+0x95/0xd1 +[21713.800655] __sys_sendmsg+0x85/0xbf +[21713.800659] do_syscall_64+0x43/0x55 +[21713.800663] entry_SYSCALL_64_after_hwframe+0x44/0xa9 + +Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00288-QCARMSWPZ-1 + +Fixes: d0eeafad1189 ("ath10k: Clean up peer when sta goes away.") +Signed-off-by: Wen Gong +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20220801141930.16794-1-quic_wgong@quicinc.com +Acked-by: Takashi Iwai + +--- + drivers/net/wireless/ath/ath10k/mac.c | 54 ++++++++++++++------------- + 1 file changed, 29 insertions(+), 25 deletions(-) + +diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c +index 9dd3b8fba4b0..23381a9db6ae 100644 +--- a/drivers/net/wireless/ath/ath10k/mac.c ++++ b/drivers/net/wireless/ath/ath10k/mac.c +@@ -864,11 +864,36 @@ static int ath10k_peer_delete(struct ath10k *ar, u32 vdev_id, const u8 *addr) + return 0; + } + ++static void ath10k_peer_map_cleanup(struct ath10k *ar, struct ath10k_peer *peer) ++{ ++ int peer_id, i; ++ ++ lockdep_assert_held(&ar->conf_mutex); ++ ++ for_each_set_bit(peer_id, peer->peer_ids, ++ ATH10K_MAX_NUM_PEER_IDS) { ++ ar->peer_map[peer_id] = NULL; ++ } ++ ++ /* Double check that peer is properly un-referenced from ++ * the peer_map ++ */ ++ for (i = 0; i < ARRAY_SIZE(ar->peer_map); i++) { ++ if (ar->peer_map[i] == peer) { ++ ath10k_warn(ar, "removing stale peer_map entry for %pM (ptr %pK idx %d)\n", ++ peer->addr, peer, i); ++ ar->peer_map[i] = NULL; ++ } ++ } ++ ++ list_del(&peer->list); ++ kfree(peer); ++ ar->num_peers--; ++} ++ + static void ath10k_peer_cleanup(struct ath10k *ar, u32 vdev_id) + { + struct ath10k_peer *peer, *tmp; +- int peer_id; +- int i; + + lockdep_assert_held(&ar->conf_mutex); + +@@ -880,25 +905,7 @@ static void ath10k_peer_cleanup(struct ath10k *ar, u32 vdev_id) + ath10k_warn(ar, "removing stale peer %pM from vdev_id %d\n", + peer->addr, vdev_id); + +- for_each_set_bit(peer_id, peer->peer_ids, +- ATH10K_MAX_NUM_PEER_IDS) { +- ar->peer_map[peer_id] = NULL; +- } +- +- /* Double check that peer is properly un-referenced from +- * the peer_map +- */ +- for (i = 0; i < ARRAY_SIZE(ar->peer_map); i++) { +- if (ar->peer_map[i] == peer) { +- ath10k_warn(ar, "removing stale peer_map entry for %pM (ptr %pK idx %d)\n", +- peer->addr, peer, i); +- ar->peer_map[i] = NULL; +- } +- } +- +- list_del(&peer->list); +- kfree(peer); +- ar->num_peers--; ++ ath10k_peer_map_cleanup(ar, peer); + } + spin_unlock_bh(&ar->data_lock); + } +@@ -7621,10 +7628,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw, + /* Clean up the peer object as well since we + * must have failed to do this above. + */ +- list_del(&peer->list); +- ar->peer_map[i] = NULL; +- kfree(peer); +- ar->num_peers--; ++ ath10k_peer_map_cleanup(ar, peer); + } + } + spin_unlock_bh(&ar->data_lock); +-- +2.35.3 + diff --git a/patches.suse/wifi-ath11k-fix-number-of-VHT-beamformee-spatial-str.patch b/patches.suse/wifi-ath11k-fix-number-of-VHT-beamformee-spatial-str.patch new file mode 100644 index 0000000..a0e250a --- /dev/null +++ b/patches.suse/wifi-ath11k-fix-number-of-VHT-beamformee-spatial-str.patch @@ -0,0 +1,101 @@ +From 55b5ee3357d7bb98ee578cf9b84a652e7a1bc199 Mon Sep 17 00:00:00 2001 +From: Jesus Fernandez Manzano +Date: Thu, 22 Sep 2022 10:35:14 +0300 +Subject: [PATCH] wifi: ath11k: fix number of VHT beamformee spatial streams +Git-commit: 55b5ee3357d7bb98ee578cf9b84a652e7a1bc199 +Patch-mainline: v6.1-rc1 +References: git-fixes + +The number of spatial streams used when acting as a beamformee in VHT +mode are reported by the firmware as 7 (8 sts - 1) both in IPQ6018 and +IPQ8074 which respectively have 2 and 4 sts each. So the firmware should +report 1 (2 - 1) and 3 (4 - 1). + +Fix this by checking that the number of VHT beamformee sts reported by +the firmware is not greater than the number of receiving antennas - 1. +The fix is based on the same approach used in this same function for +sanitizing the number of sounding dimensions reported by the firmware. + +Without this change, acting as a beamformee in VHT mode is not working +properly. + +Tested-on: IPQ6018 hw1.0 AHB WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1 +Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1 + +Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") +Signed-off-by: Jesus Fernandez Manzano +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20220616173947.21901-1-jesus.manzano@galgus.net +Acked-by: Takashi Iwai + +--- + drivers/net/wireless/ath/ath11k/mac.c | 25 ++++++++++++++++++++----- + 1 file changed, 20 insertions(+), 5 deletions(-) + +diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c +index 2cd1e6f8b3c1..dc391609e952 100644 +--- a/drivers/net/wireless/ath/ath11k/mac.c ++++ b/drivers/net/wireless/ath/ath11k/mac.c +@@ -4959,6 +4959,8 @@ static int ath11k_mac_set_txbf_conf(struct ath11k_vif *arvif) + if (vht_cap & (IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE)) { + nsts = vht_cap & IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK; + nsts >>= IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT; ++ if (nsts > (ar->num_rx_chains - 1)) ++ nsts = ar->num_rx_chains - 1; + value |= SM(nsts, WMI_TXBF_STS_CAP_OFFSET); + } + +@@ -4999,7 +5001,7 @@ static int ath11k_mac_set_txbf_conf(struct ath11k_vif *arvif) + static void ath11k_set_vht_txbf_cap(struct ath11k *ar, u32 *vht_cap) + { + bool subfer, subfee; +- int sound_dim = 0; ++ int sound_dim = 0, nsts = 0; + + subfer = !!(*vht_cap & (IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE)); + subfee = !!(*vht_cap & (IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE)); +@@ -5009,6 +5011,11 @@ static void ath11k_set_vht_txbf_cap(struct ath11k *ar, u32 *vht_cap) + subfer = false; + } + ++ if (ar->num_rx_chains < 2) { ++ *vht_cap &= ~(IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE); ++ subfee = false; ++ } ++ + /* If SU Beaformer is not set, then disable MU Beamformer Capability */ + if (!subfer) + *vht_cap &= ~(IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE); +@@ -5021,7 +5028,9 @@ static void ath11k_set_vht_txbf_cap(struct ath11k *ar, u32 *vht_cap) + sound_dim >>= IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_SHIFT; + *vht_cap &= ~IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK; + +- /* TODO: Need to check invalid STS and Sound_dim values set by FW? */ ++ nsts = (*vht_cap & IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK); ++ nsts >>= IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT; ++ *vht_cap &= ~IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK; + + /* Enable Sounding Dimension Field only if SU BF is enabled */ + if (subfer) { +@@ -5033,9 +5042,15 @@ static void ath11k_set_vht_txbf_cap(struct ath11k *ar, u32 *vht_cap) + *vht_cap |= sound_dim; + } + +- /* Use the STS advertised by FW unless SU Beamformee is not supported*/ +- if (!subfee) +- *vht_cap &= ~(IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK); ++ /* Enable Beamformee STS Field only if SU BF is enabled */ ++ if (subfee) { ++ if (nsts > (ar->num_rx_chains - 1)) ++ nsts = ar->num_rx_chains - 1; ++ ++ nsts <<= IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT; ++ nsts &= IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK; ++ *vht_cap |= nsts; ++ } + } + + static struct ieee80211_sta_vht_cap +-- +2.35.3 + diff --git a/patches.suse/wifi-mac80211-allow-bw-change-during-channel-switch-.patch b/patches.suse/wifi-mac80211-allow-bw-change-during-channel-switch-.patch new file mode 100644 index 0000000..6846266 --- /dev/null +++ b/patches.suse/wifi-mac80211-allow-bw-change-during-channel-switch-.patch @@ -0,0 +1,47 @@ +From 6b75f133fe05c36c52d691ff21545d5757fff721 Mon Sep 17 00:00:00 2001 +From: Hari Chandrakanthan +Date: Wed, 27 Jul 2022 12:02:29 +0530 +Subject: [PATCH] wifi: mac80211: allow bw change during channel switch in mesh +Git-commit: 6b75f133fe05c36c52d691ff21545d5757fff721 +Patch-mainline: v6.1-rc1 +References: git-fixes + +From 'IEEE Std 802.11-2020 section 11.8.8.4.1': + The mesh channel switch may be triggered by the need to avoid + interference to a detected radar signal, or to reassign mesh STA + channels to ensure the MBSS connectivity. + + A 20/40 MHz MBSS may be changed to a 20 MHz MBSS and a 20 MHz + MBSS may be changed to a 20/40 MHz MBSS. + +Since the standard allows the change of bandwidth during +the channel switch in mesh, remove the bandwidth check present in +ieee80211_set_csa_beacon. + +Fixes: c6da674aff94 ("{nl,cfg,mac}80211: enable the triggering of CSA frame in mesh") +Signed-off-by: Hari Chandrakanthan +Link: https://lore.kernel.org/r/1658903549-21218-1-git-send-email-quic_haric@quicinc.com +Signed-off-by: Johannes Berg +Acked-by: Takashi Iwai + +--- + net/mac80211/cfg.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c +index 854becd00468..960d5c4a5940 100644 +--- a/net/mac80211/cfg.c ++++ b/net/mac80211/cfg.c +@@ -3683,9 +3683,6 @@ static int ieee80211_set_csa_beacon(struct ieee80211_sub_if_data *sdata, + case NL80211_IFTYPE_MESH_POINT: { + struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; + +- if (params->chandef.width != sdata->vif.bss_conf.chandef.width) +- return -EINVAL; +- + /* changes into another band are not supported */ + if (sdata->vif.bss_conf.chandef.chan->band != + params->chandef.chan->band) +-- +2.35.3 + diff --git a/patches.suse/wifi-mt76-mt7615-add-mt7615_mutex_acquire-release-in.patch b/patches.suse/wifi-mt76-mt7615-add-mt7615_mutex_acquire-release-in.patch new file mode 100644 index 0000000..86863f6 --- /dev/null +++ b/patches.suse/wifi-mt76-mt7615-add-mt7615_mutex_acquire-release-in.patch @@ -0,0 +1,45 @@ +From 765c69d477a44c088e5d19e7758dfa4db418e3ba Mon Sep 17 00:00:00 2001 +From: Lorenzo Bianconi +Date: Mon, 25 Jul 2022 10:26:40 +0200 +Subject: [PATCH] wifi: mt76: mt7615: add mt7615_mutex_acquire/release in mt7615_sta_set_decap_offload +Git-commit: 765c69d477a44c088e5d19e7758dfa4db418e3ba +Patch-mainline: v6.1-rc1 +References: git-fixes + +Similar to mt7921 driver, introduce mt7615_mutex_acquire/release in +mt7615_sta_set_decap_offload in order to avoid sending mcu commands +while the device is in low-power state. + +Fixes: d4b98c63d7a77 ("mt76: mt7615: add support for rx decapsulation offload") +Signed-off-by: Lorenzo Bianconi +Signed-off-by: Felix Fietkau +Acked-by: Takashi Iwai + +--- + drivers/net/wireless/mediatek/mt76/mt7615/main.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/main.c b/drivers/net/wireless/mediatek/mt76/mt7615/main.c +index 9bf8545c8c17..8d4733f87cda 100644 +--- a/drivers/net/wireless/mediatek/mt76/mt7615/main.c ++++ b/drivers/net/wireless/mediatek/mt76/mt7615/main.c +@@ -1195,12 +1195,16 @@ static void mt7615_sta_set_decap_offload(struct ieee80211_hw *hw, + struct mt7615_dev *dev = mt7615_hw_dev(hw); + struct mt7615_sta *msta = (struct mt7615_sta *)sta->drv_priv; + ++ mt7615_mutex_acquire(dev); ++ + if (enabled) + set_bit(MT_WCID_FLAG_HDR_TRANS, &msta->wcid.flags); + else + clear_bit(MT_WCID_FLAG_HDR_TRANS, &msta->wcid.flags); + + mt7615_mcu_set_sta_decap_offload(dev, vif, sta); ++ ++ mt7615_mutex_release(dev); + } + + #ifdef CONFIG_PM +-- +2.35.3 + diff --git a/patches.suse/wifi-mt76-mt7915-do-not-check-state-before-configuri.patch b/patches.suse/wifi-mt76-mt7915-do-not-check-state-before-configuri.patch new file mode 100644 index 0000000..80a398c --- /dev/null +++ b/patches.suse/wifi-mt76-mt7915-do-not-check-state-before-configuri.patch @@ -0,0 +1,42 @@ +From d2b5bb6dfab29fe32bedefaade88dcd182c03a00 Mon Sep 17 00:00:00 2001 +From: Howard Hsu +Date: Thu, 18 Aug 2022 10:44:07 +0800 +Subject: [PATCH] wifi: mt76: mt7915: do not check state before configuring implicit beamform +Git-commit: d2b5bb6dfab29fe32bedefaade88dcd182c03a00 +Patch-mainline: v6.1-rc1 +References: git-fixes + +Do not need to check running state before configuring implicit Tx +beamform. It is okay to configure implicit Tx beamform in run time. +Noted that the existing connected stations will be applied for new +configuration only if they reconnected to the interface. + +Fixes: 6d6dc980e07d ("mt76: mt7915: add implicit Tx beamforming support") +Signed-off-by: Howard Hsu +Signed-off-by: Felix Fietkau +Acked-by: Takashi Iwai + +--- + drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c +index fd76db8f5269..6ef3431cad64 100644 +--- a/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c ++++ b/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c +@@ -23,9 +23,9 @@ mt7915_implicit_txbf_set(void *data, u64 val) + { + struct mt7915_dev *dev = data; + +- if (test_bit(MT76_STATE_RUNNING, &dev->mphy.state)) +- return -EBUSY; +- ++ /* The existing connected stations shall reconnect to apply ++ * new implicit txbf configuration. ++ */ + dev->ibf = !!val; + + return mt7915_mcu_set_txbf(dev, MT_BF_TYPE_UPDATE); +-- +2.35.3 + diff --git a/patches.suse/wifi-mt76-sdio-fix-transmitting-packet-hangs.patch b/patches.suse/wifi-mt76-sdio-fix-transmitting-packet-hangs.patch new file mode 100644 index 0000000..691b8f1 --- /dev/null +++ b/patches.suse/wifi-mt76-sdio-fix-transmitting-packet-hangs.patch @@ -0,0 +1,37 @@ +From 250b1827205846ff346a76044955cb79d4963f70 Mon Sep 17 00:00:00 2001 +From: YN Chen +Date: Sat, 23 Jul 2022 05:59:23 +0800 +Subject: [PATCH] wifi: mt76: sdio: fix transmitting packet hangs +Git-commit: 250b1827205846ff346a76044955cb79d4963f70 +Patch-mainline: v6.1-rc1 +References: git-fixes + +Fix transmitting packets hangs with continuing to pull the pending packet +from mac80211 queues when receiving Tx status notification from the device. + +Fixes: aac5104bf631 ("mt76: sdio: do not run mt76_txq_schedule directly") +Acked-by: Sean Wang +Signed-off-by: YN Chen +Signed-off-by: Felix Fietkau +Acked-by: Takashi Iwai + +--- + drivers/net/wireless/mediatek/mt76/sdio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/mediatek/mt76/sdio.c b/drivers/net/wireless/mediatek/mt76/sdio.c +index ece4e4bb94a1..0ec308f99af5 100644 +--- a/drivers/net/wireless/mediatek/mt76/sdio.c ++++ b/drivers/net/wireless/mediatek/mt76/sdio.c +@@ -485,7 +485,7 @@ static void mt76s_status_worker(struct mt76_worker *w) + } while (nframes > 0); + + if (resched) +- mt76_worker_schedule(&dev->sdio.txrx_worker); ++ mt76_worker_schedule(&dev->tx_worker); + } + + static void mt76s_tx_status_data(struct work_struct *work) +-- +2.35.3 + diff --git a/patches.suse/wifi-rtl8xxxu-Fix-AIFS-written-to-REG_EDCA_-_PARAM.patch b/patches.suse/wifi-rtl8xxxu-Fix-AIFS-written-to-REG_EDCA_-_PARAM.patch new file mode 100644 index 0000000..150a61f --- /dev/null +++ b/patches.suse/wifi-rtl8xxxu-Fix-AIFS-written-to-REG_EDCA_-_PARAM.patch @@ -0,0 +1,93 @@ +From 5574d3290449916397f3092dcd2bac92415498e1 Mon Sep 17 00:00:00 2001 +From: Bitterblue Smith +Date: Sun, 18 Sep 2022 15:42:25 +0300 +Subject: [PATCH] wifi: rtl8xxxu: Fix AIFS written to REG_EDCA_*_PARAM +Git-commit: 5574d3290449916397f3092dcd2bac92415498e1 +Patch-mainline: v6.1-rc1 +References: git-fixes + +ieee80211_tx_queue_params.aifs is not supposed to be written directly +to the REG_EDCA_*_PARAM registers. Instead process it like the vendor +drivers do. It's kinda hacky but it works. + +This change boosts the download speed and makes it more stable. + +Tested with RTL8188FU but all the other supported chips should also +benefit. + +Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)") +Signed-off-by: Bitterblue Smith +Acked-by: Jes Sorensen +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/038cc03f-3567-77ba-a7bd-c4930e3b2fad@gmail.com +Acked-by: Takashi Iwai + +--- + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 49 ++++++++++++++++++ + 1 file changed, 49 insertions(+) + +--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c ++++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +@@ -4507,6 +4507,53 @@ rtl8xxxu_wireless_mode(struct ieee80211_ + return network_type; + } + ++static void rtl8xxxu_set_aifs(struct rtl8xxxu_priv *priv, u8 slot_time) ++{ ++ u32 reg_edca_param[IEEE80211_NUM_ACS] = { ++ [IEEE80211_AC_VO] = REG_EDCA_VO_PARAM, ++ [IEEE80211_AC_VI] = REG_EDCA_VI_PARAM, ++ [IEEE80211_AC_BE] = REG_EDCA_BE_PARAM, ++ [IEEE80211_AC_BK] = REG_EDCA_BK_PARAM, ++ }; ++ u32 val32; ++ u16 wireless_mode = 0; ++ u8 aifs, aifsn, sifs; ++ int i; ++ ++ if (priv->vif) { ++ struct ieee80211_sta *sta; ++ ++ rcu_read_lock(); ++ sta = ieee80211_find_sta(priv->vif, priv->vif->bss_conf.bssid); ++ if (sta) ++ wireless_mode = rtl8xxxu_wireless_mode(priv->hw, sta); ++ rcu_read_unlock(); ++ } ++ ++ if (priv->hw->conf.chandef.chan->band == NL80211_BAND_5GHZ || ++ (wireless_mode & WIRELESS_MODE_N_24G)) ++ sifs = 16; ++ else ++ sifs = 10; ++ ++ for (i = 0; i < IEEE80211_NUM_ACS; i++) { ++ val32 = rtl8xxxu_read32(priv, reg_edca_param[i]); ++ ++ /* It was set in conf_tx. */ ++ aifsn = val32 & 0xff; ++ ++ /* aifsn not set yet or already fixed */ ++ if (aifsn < 2 || aifsn > 15) ++ continue; ++ ++ aifs = aifsn * slot_time + sifs; ++ ++ val32 &= ~0xff; ++ val32 |= aifs; ++ rtl8xxxu_write32(priv, reg_edca_param[i], val32); ++ } ++} ++ + static void + rtl8xxxu_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + struct ieee80211_bss_conf *bss_conf, u32 changed) +@@ -4592,6 +4639,8 @@ rtl8xxxu_bss_info_changed(struct ieee802 + else + val8 = 20; + rtl8xxxu_write8(priv, REG_SLOT, val8); ++ ++ rtl8xxxu_set_aifs(priv, val8); + } + + if (changed & BSS_CHANGED_BSSID) { diff --git a/patches.suse/wifi-rtl8xxxu-Fix-skb-misuse-in-TX-queue-selection.patch b/patches.suse/wifi-rtl8xxxu-Fix-skb-misuse-in-TX-queue-selection.patch new file mode 100644 index 0000000..74a0382 --- /dev/null +++ b/patches.suse/wifi-rtl8xxxu-Fix-skb-misuse-in-TX-queue-selection.patch @@ -0,0 +1,47 @@ +From edd5747aa12ed61a5ecbfa58d3908623fddbf1e8 Mon Sep 17 00:00:00 2001 +From: Bitterblue Smith +Date: Wed, 31 Aug 2022 19:12:36 +0300 +Subject: [PATCH] wifi: rtl8xxxu: Fix skb misuse in TX queue selection +Git-commit: edd5747aa12ed61a5ecbfa58d3908623fddbf1e8 +Patch-mainline: v6.1-rc1 +References: git-fixes + +rtl8xxxu_queue_select() selects the wrong TX queues because it's +reading memory from the wrong address. It expects to find ieee80211_hdr +at skb->data, but that's not the case after skb_push(). Move the call +to rtl8xxxu_queue_select() before the call to skb_push(). + +Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)") +Signed-off-by: Bitterblue Smith +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/7fa4819a-4f20-b2af-b7a6-8ee01ac49295@gmail.com +Acked-by: Takashi Iwai + +--- + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +index 862e9c711ac2..070ec3cb067e 100644 +--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c ++++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +@@ -5062,6 +5062,8 @@ static void rtl8xxxu_tx(struct ieee80211_hw *hw, + if (control && control->sta) + sta = control->sta; + ++ queue = rtl8xxxu_queue_select(hw, skb); ++ + tx_desc = skb_push(skb, tx_desc_size); + + memset(tx_desc, 0, tx_desc_size); +@@ -5074,7 +5076,6 @@ static void rtl8xxxu_tx(struct ieee80211_hw *hw, + is_broadcast_ether_addr(ieee80211_get_DA(hdr))) + tx_desc->txdw0 |= TXDESC_BROADMULTICAST; + +- queue = rtl8xxxu_queue_select(hw, skb); + tx_desc->txdw1 = cpu_to_le32(queue << TXDESC_QUEUE_SHIFT); + + if (tx_info->control.hw_key) { +-- +2.35.3 + diff --git a/patches.suse/wifi-rtl8xxxu-Improve-rtl8xxxu_queue_select.patch b/patches.suse/wifi-rtl8xxxu-Improve-rtl8xxxu_queue_select.patch new file mode 100644 index 0000000..3006f94 --- /dev/null +++ b/patches.suse/wifi-rtl8xxxu-Improve-rtl8xxxu_queue_select.patch @@ -0,0 +1,52 @@ +From 2fc6de5c6924aea5e84d2edaa40ed744f0720844 Mon Sep 17 00:00:00 2001 +From: Bitterblue Smith +Date: Sun, 18 Sep 2022 15:47:05 +0300 +Subject: [PATCH] wifi: rtl8xxxu: Improve rtl8xxxu_queue_select +Git-commit: 2fc6de5c6924aea5e84d2edaa40ed744f0720844 +Patch-mainline: v6.1-rc1 +References: git-fixes + +Remove the unused ieee80211_hw* parameter, and pass ieee80211_hdr* +instead of relying on skb->data having the right value at the time +the function is called. + +This doesn't change the functionality at all. + +Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)") +Signed-off-by: Bitterblue Smith +Acked-by: Jes Sorensen +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/2af44c28-1c12-46b9-85b9-011560bf7f7e@gmail.com +Acked-by: Takashi Iwai + +--- + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +index 731aba24bb38..ac641a56efb0 100644 +--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c ++++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +@@ -4767,9 +4767,8 @@ static u32 rtl8xxxu_80211_to_rtl_queue(u32 queue) + return rtlqueue; + } + +-static u32 rtl8xxxu_queue_select(struct ieee80211_hw *hw, struct sk_buff *skb) ++static u32 rtl8xxxu_queue_select(struct ieee80211_hdr *hdr, struct sk_buff *skb) + { +- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; + u32 queue; + + if (ieee80211_is_mgmt(hdr->frame_control)) +@@ -5119,7 +5118,7 @@ static void rtl8xxxu_tx(struct ieee80211_hw *hw, + if (control && control->sta) + sta = control->sta; + +- queue = rtl8xxxu_queue_select(hw, skb); ++ queue = rtl8xxxu_queue_select(hdr, skb); + + tx_desc = skb_push(skb, tx_desc_size); + +-- +2.35.3 + diff --git a/patches.suse/wifi-rtl8xxxu-Remove-copy-paste-leftover-in-gen2_upd.patch b/patches.suse/wifi-rtl8xxxu-Remove-copy-paste-leftover-in-gen2_upd.patch new file mode 100644 index 0000000..585490c --- /dev/null +++ b/patches.suse/wifi-rtl8xxxu-Remove-copy-paste-leftover-in-gen2_upd.patch @@ -0,0 +1,49 @@ +From d5350756c03cdf18696295c6b11d7acc4dbf825c Mon Sep 17 00:00:00 2001 +From: Bitterblue Smith +Date: Fri, 2 Sep 2022 16:15:30 +0300 +Subject: [PATCH] wifi: rtl8xxxu: Remove copy-paste leftover in gen2_update_rate_mask +Git-commit: d5350756c03cdf18696295c6b11d7acc4dbf825c +Patch-mainline: v6.1-rc1 +References: git-fixes + +It looks like a leftover from copying rtl8xxxu_update_rate_mask, +which is used with the gen1 chips. + +It wasn't causing any problems for my RTL8188FU test device, but it's +clearly a mistake, so remove it. + +Fixes: f653e69009c6 ("rtl8xxxu: Implement basic 8723b specific update_rate_mask() function") +Signed-off-by: Bitterblue Smith +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/d5544fe8-9798-28f1-54bd-6839a1974b10@gmail.com +Acked-by: Takashi Iwai + +--- + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +index 0cc29988ae67..02ea75354908 100644 +--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c ++++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +@@ -4353,15 +4353,14 @@ void rtl8xxxu_gen2_update_rate_mask(struct rtl8xxxu_priv *priv, + h2c.b_macid_cfg.ramask2 = (ramask >> 16) & 0xff; + h2c.b_macid_cfg.ramask3 = (ramask >> 24) & 0xff; + +- h2c.ramask.arg = 0x80; + h2c.b_macid_cfg.data1 = rateid; + if (sgi) + h2c.b_macid_cfg.data1 |= BIT(7); + + h2c.b_macid_cfg.data2 = bw; + +- dev_dbg(&priv->udev->dev, "%s: rate mask %08x, arg %02x, size %zi\n", +- __func__, ramask, h2c.ramask.arg, sizeof(h2c.b_macid_cfg)); ++ dev_dbg(&priv->udev->dev, "%s: rate mask %08x, rateid %02x, sgi %d, size %zi\n", ++ __func__, ramask, rateid, sgi, sizeof(h2c.b_macid_cfg)); + rtl8xxxu_gen2_h2c_cmd(priv, &h2c, sizeof(h2c.b_macid_cfg)); + } + +-- +2.35.3 + diff --git a/patches.suse/wifi-rtl8xxxu-gen2-Fix-mistake-in-path-B-IQ-calibrat.patch b/patches.suse/wifi-rtl8xxxu-gen2-Fix-mistake-in-path-B-IQ-calibrat.patch new file mode 100644 index 0000000..28200a4 --- /dev/null +++ b/patches.suse/wifi-rtl8xxxu-gen2-Fix-mistake-in-path-B-IQ-calibrat.patch @@ -0,0 +1,46 @@ +From e963a19c64ac0d2f8785d36a27391abd91ac77aa Mon Sep 17 00:00:00 2001 +From: Bitterblue Smith +Date: Fri, 2 Sep 2022 14:48:32 +0300 +Subject: [PATCH] wifi: rtl8xxxu: gen2: Fix mistake in path B IQ calibration +Git-commit: e963a19c64ac0d2f8785d36a27391abd91ac77aa +Patch-mainline: v6.1-rc1 +References: git-fixes + +Found by comparing with the vendor driver. Currently this affects +only the RTL8192EU, which is the only gen2 chip with 2 TX paths +supported by this driver. It's unclear what kind of effect the +mistake had in practice, since I don't have any RTL8192EU devices +to test it. + +Fixes: e1547c535ede ("rtl8xxxu: First stab at adding IQK calibration for 8723bu parts") +Signed-off-by: Bitterblue Smith +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/30a59f3a-cfa9-8379-7af0-78a8f4c77cfd@gmail.com +Acked-by: Takashi Iwai + +--- + drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +index 070ec3cb067e..0cc29988ae67 100644 +--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c ++++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +@@ -2929,12 +2929,12 @@ bool rtl8xxxu_gen2_simularity_compare(struct rtl8xxxu_priv *priv, + } + + if (!(simubitmap & 0x30) && priv->tx_paths > 1) { +- /* path B RX OK */ ++ /* path B TX OK */ + for (i = 4; i < 6; i++) + result[3][i] = result[c1][i]; + } + +- if (!(simubitmap & 0x30) && priv->tx_paths > 1) { ++ if (!(simubitmap & 0xc0) && priv->tx_paths > 1) { + /* path B RX OK */ + for (i = 6; i < 8; i++) + result[3][i] = result[c1][i]; +-- +2.35.3 + diff --git a/patches.suse/wifi-rtl8xxxu-tighten-bounds-checking-in-rtl8xxxu_re.patch b/patches.suse/wifi-rtl8xxxu-tighten-bounds-checking-in-rtl8xxxu_re.patch new file mode 100644 index 0000000..99181cb --- /dev/null +++ b/patches.suse/wifi-rtl8xxxu-tighten-bounds-checking-in-rtl8xxxu_re.patch @@ -0,0 +1,59 @@ +From 620d5eaeb9059636864bda83ca1c68c20ede34a5 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Fri, 19 Aug 2022 08:22:32 +0300 +Subject: [PATCH] wifi: rtl8xxxu: tighten bounds checking in rtl8xxxu_read_efuse() +Git-commit: 620d5eaeb9059636864bda83ca1c68c20ede34a5 +Patch-mainline: v6.1-rc1 +References: git-fixes + +There some bounds checking to ensure that "map_addr" is not out of +bounds before the start of the loop. But the checking needs to be +done as we iterate through the loop because "map_addr" gets larger as +we iterate. + +Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)") +Signed-off-by: Dan Carpenter +Acked-by: Jes Sorensen +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/Yv8eGLdBslLAk3Ct@kili +Acked-by: Takashi Iwai + +--- + .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +index c66f0726b253..f3a107f19cf5 100644 +--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c ++++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +@@ -1878,13 +1878,6 @@ static int rtl8xxxu_read_efuse(struct rtl8xxxu_priv *priv) + + /* We have 8 bits to indicate validity */ + map_addr = offset * 8; +- if (map_addr >= EFUSE_MAP_LEN) { +- dev_warn(dev, "%s: Illegal map_addr (%04x), " +- "efuse corrupt!\n", +- __func__, map_addr); +- ret = -EINVAL; +- goto exit; +- } + for (i = 0; i < EFUSE_MAX_WORD_UNIT; i++) { + /* Check word enable condition in the section */ + if (word_mask & BIT(i)) { +@@ -1895,6 +1888,13 @@ static int rtl8xxxu_read_efuse(struct rtl8xxxu_priv *priv) + ret = rtl8xxxu_read_efuse8(priv, efuse_addr++, &val8); + if (ret) + goto exit; ++ if (map_addr >= EFUSE_MAP_LEN - 1) { ++ dev_warn(dev, "%s: Illegal map_addr (%04x), " ++ "efuse corrupt!\n", ++ __func__, map_addr); ++ ret = -EINVAL; ++ goto exit; ++ } + priv->efuse_wifi.raw[map_addr++] = val8; + + ret = rtl8xxxu_read_efuse8(priv, efuse_addr++, &val8); +-- +2.35.3 + diff --git a/patches.suse/wifi-rtlwifi-8192de-correct-checking-of-IQK-reload.patch b/patches.suse/wifi-rtlwifi-8192de-correct-checking-of-IQK-reload.patch new file mode 100644 index 0000000..3641ed8 --- /dev/null +++ b/patches.suse/wifi-rtlwifi-8192de-correct-checking-of-IQK-reload.patch @@ -0,0 +1,52 @@ +From 93fbc1ebd978cf408ef5765e9c1630fce9a8621b Mon Sep 17 00:00:00 2001 +From: Ping-Ke Shih +Date: Mon, 1 Aug 2022 19:33:45 +0800 +Subject: [PATCH] wifi: rtlwifi: 8192de: correct checking of IQK reload +Git-commit: 93fbc1ebd978cf408ef5765e9c1630fce9a8621b +Patch-mainline: v6.1-rc1 +References: git-fixes + +Since IQK could spend time, we make a cache of IQK result matrix that looks +like iqk_matrix[channel_idx].val[x][y], and we can reload the matrix if we +have made a cache. To determine a cache is made, we check +iqk_matrix[channel_idx].val[0][0]. + +The initial commit 7274a8c22980 ("rtlwifi: rtl8192de: Merge phy routines") +make a mistake that checks incorrect iqk_matrix[channel_idx].val[0] that +is always true, and this mistake is found by commit ee3db469dd31 +("wifi: rtlwifi: remove always-true condition pointed out by GCC 12"), so +I recall the vendor driver to find fix and apply the correctness. + +Fixes: 7274a8c22980 ("rtlwifi: rtl8192de: Merge phy routines") +Signed-off-by: Ping-Ke Shih +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20220801113345.42016-1-pkshih@realtek.com +Acked-by: Takashi Iwai + +--- + drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c +index 15e6a6aded31..d18c092b6142 100644 +--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c ++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c +@@ -2386,11 +2386,10 @@ void rtl92d_phy_reload_iqk_setting(struct ieee80211_hw *hw, u8 channel) + rtl_dbg(rtlpriv, COMP_SCAN, DBG_LOUD, + "Just Read IQK Matrix reg for channel:%d....\n", + channel); +- _rtl92d_phy_patha_fill_iqk_matrix(hw, true, +- rtlphy->iqk_matrix[ +- indexforchannel].value, 0, +- (rtlphy->iqk_matrix[ +- indexforchannel].value[0][2] == 0)); ++ if (rtlphy->iqk_matrix[indexforchannel].value[0][0] != 0) ++ _rtl92d_phy_patha_fill_iqk_matrix(hw, true, ++ rtlphy->iqk_matrix[indexforchannel].value, 0, ++ rtlphy->iqk_matrix[indexforchannel].value[0][2] == 0); + if (IS_92D_SINGLEPHY(rtlhal->version)) { + if ((rtlphy->iqk_matrix[ + indexforchannel].value[0][4] != 0) +-- +2.35.3 + diff --git a/patches.suse/wifi-rtw88-add-missing-destroy_workqueue-on-error-pa.patch b/patches.suse/wifi-rtw88-add-missing-destroy_workqueue-on-error-pa.patch new file mode 100644 index 0000000..aab9815 --- /dev/null +++ b/patches.suse/wifi-rtw88-add-missing-destroy_workqueue-on-error-pa.patch @@ -0,0 +1,55 @@ +From b0ea758b30bbdf7c4323c78b7c50c05d2e1224d5 Mon Sep 17 00:00:00 2001 +From: Yang Yingliang +Date: Fri, 26 Aug 2022 10:38:17 +0800 +Subject: [PATCH] wifi: rtw88: add missing destroy_workqueue() on error path in rtw_core_init() +Git-commit: b0ea758b30bbdf7c4323c78b7c50c05d2e1224d5 +Patch-mainline: v6.1-rc1 +References: git-fixes + +Add the missing destroy_workqueue() before return from rtw_core_init() +in error path. + +Fixes: fe101716c7c9 ("rtw88: replace tx tasklet with work queue") +Signed-off-by: Yang Yingliang +Reviewed-by: Ping-Ke Shih +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20220826023817.3908255-1-yangyingliang@huawei.com +Acked-by: Takashi Iwai + +--- + drivers/net/wireless/realtek/rtw88/main.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c +index 5a74dda97756..67151dbf8384 100644 +--- a/drivers/net/wireless/realtek/rtw88/main.c ++++ b/drivers/net/wireless/realtek/rtw88/main.c +@@ -2093,7 +2093,7 @@ int rtw_core_init(struct rtw_dev *rtwdev) + ret = rtw_load_firmware(rtwdev, RTW_NORMAL_FW); + if (ret) { + rtw_warn(rtwdev, "no firmware loaded\n"); +- return ret; ++ goto out; + } + + if (chip->wow_fw_name) { +@@ -2103,11 +2103,15 @@ int rtw_core_init(struct rtw_dev *rtwdev) + wait_for_completion(&rtwdev->fw.completion); + if (rtwdev->fw.firmware) + release_firmware(rtwdev->fw.firmware); +- return ret; ++ goto out; + } + } + + return 0; ++ ++out: ++ destroy_workqueue(rtwdev->tx_wq); ++ return ret; + } + EXPORT_SYMBOL(rtw_core_init); + +-- +2.35.3 + diff --git a/patches.suse/x86-ftrace-Use-alternative-RET-encoding.patch b/patches.suse/x86-ftrace-Use-alternative-RET-encoding.patch deleted file mode 100644 index 2b13a93..0000000 --- a/patches.suse/x86-ftrace-Use-alternative-RET-encoding.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Peter Zijlstra -Date: Tue, 14 Jun 2022 23:15:40 +0200 -Subject: x86/ftrace: Use alternative RET encoding -Git-commit: 1f001e9da6bbf482311e45e48f53c2bd2179e59c -Patch-mainline: v5.19-rc7 -References: bsc#1199657 CVE-2022-29900 CVE-2022-29901 - -Use the return thunk in ftrace trampolines, if needed. - -Signed-off-by: Peter Zijlstra (Intel) -Signed-off-by: Borislav Petkov -Reviewed-by: Josh Poimboeuf -Signed-off-by: Borislav Petkov ---- - arch/x86/kernel/ftrace.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - ---- a/arch/x86/kernel/ftrace.c -+++ b/arch/x86/kernel/ftrace.c -@@ -308,7 +308,7 @@ union ftrace_op_code_union { - } __attribute__((packed)); - }; - --#define RET_SIZE 1 + IS_ENABLED(CONFIG_SLS) -+#define RET_SIZE (IS_ENABLED(CONFIG_RETPOLINE) ? 5 : 1 + IS_ENABLED(CONFIG_SLS)) - - static unsigned long - create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size) -@@ -364,6 +364,8 @@ create_trampoline(struct ftrace_ops *ops - goto fail; - - ip = trampoline + size; -+ if (cpu_feature_enabled(X86_FEATURE_RETHUNK)) -+ __text_gen_insn(ip, JMP32_INSN_OPCODE, ip, &__x86_return_thunk, JMP32_INSN_SIZE); - - /* The trampoline ends with ret(q) */ - retq = (unsigned long)ftrace_stub; diff --git a/patches.suse/x86-ftrace-use-alternative-ret-encoding.patch b/patches.suse/x86-ftrace-use-alternative-ret-encoding.patch new file mode 100644 index 0000000..d480c1a --- /dev/null +++ b/patches.suse/x86-ftrace-use-alternative-ret-encoding.patch @@ -0,0 +1,43 @@ +From: Peter Zijlstra +Date: Tue, 14 Jun 2022 23:15:40 +0200 +Subject: x86/ftrace: Use alternative RET encoding +Git-commit: 1f001e9da6bbf482311e45e48f53c2bd2179e59c +Patch-mainline: v5.19-rc7 +References: bsc#1203969, bsc#1199657 CVE-2022-29900 CVE-2022-29901 + +Use the return thunk in ftrace trampolines, if needed. + +Signed-off-by: Peter Zijlstra (Intel) +Signed-off-by: Borislav Petkov +Reviewed-by: Josh Poimboeuf +Signed-off-by: Borislav Petkov +--- + arch/x86/kernel/ftrace.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c +index 5b4efc927d80..24b9fa89aa27 100644 +--- a/arch/x86/kernel/ftrace.c ++++ b/arch/x86/kernel/ftrace.c +@@ -301,7 +301,7 @@ union ftrace_op_code_union { + } __attribute__((packed)); + }; + +-#define RET_SIZE 1 + IS_ENABLED(CONFIG_SLS) ++#define RET_SIZE (IS_ENABLED(CONFIG_RETPOLINE) ? 5 : 1 + IS_ENABLED(CONFIG_SLS)) + + static unsigned long + create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size) +@@ -357,7 +357,10 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size) + goto fail; + + ip = trampoline + size; +- memcpy(ip, retq, RET_SIZE); ++ if (cpu_feature_enabled(X86_FEATURE_RETHUNK)) ++ __text_gen_insn(ip, JMP32_INSN_OPCODE, ip, &__x86_return_thunk, JMP32_INSN_SIZE); ++ else ++ memcpy(ip, retq, sizeof(retq)); + + /* No need to test direct calls on created trampolines */ + if (ops->flags & FTRACE_OPS_FL_SAVE_REGS) { + diff --git a/patches.suse/x86-ibt-ftrace-make-function-graph-play-nice.patch b/patches.suse/x86-ibt-ftrace-make-function-graph-play-nice.patch new file mode 100644 index 0000000..ecc8528 --- /dev/null +++ b/patches.suse/x86-ibt-ftrace-make-function-graph-play-nice.patch @@ -0,0 +1,56 @@ +From: Peter Zijlstra +Date: Tue, 8 Mar 2022 16:30:31 +0100 +Subject: x86/ibt,ftrace: Make function-graph play nice +Git-commit: e52fc2cf3f662828cc0d51c4b73bed73ad275fce +Patch-mainline: v5.18-rc1 +References: bsc#1203969 + +Return trampoline must not use indirect branch to return; while this +preserves the RSB, it is fundamentally incompatible with IBT. Instead +use a retpoline like ROP gadget that defeats IBT while not unbalancing +the RSB. + +And since ftrace_stub is no longer a plain RET, don't use it to copy +from. Since RET is a trivial instruction, poke it directly. + +Signed-off-by: Peter Zijlstra (Intel) +Acked-by: Josh Poimboeuf +Link: https://lore.kernel.org/r/20220308154318.347296408@infradead.org + [ bp: Do not backport the ftrace_64.S bits for now as we don't have IBT. ] +Acked-by: Borislav Petkov +--- + arch/x86/kernel/ftrace.c | 9 ++------- + 2 files changed, 19 insertions(+), 11 deletions(-) + +diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c +index 7cc540e6de0c..1e31c7d21597 100644 +--- a/arch/x86/kernel/ftrace.c ++++ b/arch/x86/kernel/ftrace.c +@@ -316,12 +316,12 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size) + unsigned long offset; + unsigned long npages; + unsigned long size; +- unsigned long retq; + unsigned long *ptr; + void *trampoline; + void *ip; + /* 48 8b 15 is movq (%rip), %rdx */ + unsigned const char op_ref[] = { 0x48, 0x8b, 0x15 }; ++ unsigned const char retq[] = { RET_INSN_OPCODE, INT3_INSN_OPCODE }; + union ftrace_op_code_union op_ptr; + int ret; + +@@ -359,12 +359,7 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size) + goto fail; + + ip = trampoline + size; +- +- /* The trampoline ends with ret(q) */ +- retq = (unsigned long)ftrace_stub; +- ret = copy_from_kernel_nofault(ip, (void *)retq, RET_SIZE); +- if (WARN_ON(ret < 0)) +- goto fail; ++ memcpy(ip, retq, RET_SIZE); + + /* No need to test direct calls on created trampolines */ + if (ops->flags & FTRACE_OPS_FL_SAVE_REGS) { diff --git a/rpm/constraints.in b/rpm/constraints.in index 942f904..712a0f8 100644 --- a/rpm/constraints.in +++ b/rpm/constraints.in @@ -134,7 +134,7 @@ - + aarch64 @@ -144,7 +144,7 @@ - 50 + 45 diff --git a/series.conf b/series.conf index 5c91b6e..cf4ba93 100644 --- a/series.conf +++ b/series.conf @@ -7119,6 +7119,7 @@ patches.suse/0001-KVM-SEV-Fix-typo-in-and-tweak-name-of-cmd_allowed_fr.patch patches.suse/selftests-KVM-Add-x86_64-sev_migrate_tests-to-.gitig.patch patches.suse/KVM-x86-Assume-a-64-bit-hypercall-for-guests-with-pr.patch + patches.suse/0001-parisc-sticon-fix-reverse-colors.patch patches.suse/fs-handle-circular-mappings-correctly.patch patches.suse/udf-Fix-crash-after-seekdir.patch patches.suse/btrfs-fix-memory-ordering-between-normal-and-ordered-work-functions.patch @@ -9615,6 +9616,7 @@ patches.suse/drm-nouveau-fix-off-by-one-in-BIOS-boundary-checking.patch patches.suse/dma-buf-heaps-Fix-potential-spectre-v1-gadget.patch patches.suse/0001-Revert-fbcon-Disable-accelerated-scrolling.patch + patches.suse/0002-fbcon-Add-option-to-enable-legacy-hardware-accelerat.patch patches.suse/drm-i915-overlay-Prevent-divide-by-zero-bugs-in-scal.patch patches.suse/drm-i915-adlp-Fix-TypeC-PHY-ready-status-readout.patch patches.suse/ALSA-hda-Fix-UAF-of-leds-class-devs-at-unbinding.patch @@ -11325,6 +11327,7 @@ patches.suse/tracing-Have-trace-event-string-test-handle-zero-length-strings.patch patches.suse/x86-ibt-paravirt-use-text_gen_insn-for-paravirt_patch.patch patches.suse/x86-ibt-xen-sprinkle-the-endbr.patch + patches.suse/x86-ibt-ftrace-make-function-graph-play-nice.patch patches.suse/mailbox-tegra-hsp-Flush-whole-channel.patch patches.suse/mailbox-imx-fix-wakeup-failure-from-freeze-mode.patch patches.suse/mailbox-imx-fix-crash-in-resume-on-i.mx8ulp.patch @@ -12417,14 +12420,24 @@ patches.suse/media-i2c-max9286-fix-kernel-oops-when-removing-modu.patch patches.suse/media-media-entity.h-Fix-documentation-for-media_cre.patch patches.suse/media-venus-hfi-avoid-null-dereference-in-deinit.patch + patches.suse/media-imx-jpeg-Add-pm-sleep-support-for-imx-jpeg.patch + patches.suse/media-coda-Fix-reported-H264-profile.patch + patches.suse/media-coda-Add-more-H264-levels-for-CODA960.patch patches.suse/media-pci-cx23885-Fix-the-error-handling-in-cx23885_.patch patches.suse/media-cx25821-Fix-the-warning-when-removing-the-modu.patch patches.suse/media-hantro-Empty-encoder-capture-buffers-by-defaul.patch patches.suse/media-uvcvideo-Fix-missing-check-to-determine-if-ele.patch + patches.suse/media-aspeed-Fix-an-error-handling-path-in-aspeed_vi.patch + patches.suse/media-exynos4-is-Fix-PM-disable-depth-imbalance-in-f.patch + patches.suse/media-st-delta-Fix-PM-disable-depth-imbalance-in-del.patch patches.suse/media-atmel-atmel-isc-Fix-PM-disable-depth-imbalance.patch + patches.suse/media-imx-jpeg-Fix-potential-array-out-of-bounds-in-.patch patches.suse/media-i2c-rdacm2x-properly-set-subdev-entity-functio.patch + patches.suse/media-exynos4-is-Change-clk_disable-to-clk_disable_u.patch + patches.suse/media-imx-jpeg-Refactor-function-mxc_jpeg_parse.patch patches.suse/media-rga-fix-possible-memory-leak-in-rga_probe.patch patches.suse/media-pvrusb2-fix-array-index-out-of-bounds-in-pvr2_.patch + patches.suse/media-vsp1-Fix-offset-calculation-for-plane-cropping.patch patches.suse/media-atmel-atmel-sama5d2-isc-fix-wrong-mask-in-YUYV.patch patches.suse/media-hantro-HEVC-Fix-tile-info-buffer-value-computa.patch patches.suse/media-hantro-HEVC-unconditionnaly-set-pps_-cb-cr-_qp.patch @@ -13081,6 +13094,8 @@ patches.suse/regulator-mt6315-regulator-fix-invalid-allowed-mode.patch patches.suse/gpio-pca953x-use-the-correct-register-address-to-do-.patch patches.suse/gpio-adp5588-Remove-support-for-platform-setup-and-t.patch + patches.suse/0006-parisc-stifb-Implement-fb_is_primary_device.patch + patches.suse/0007-parisc-stifb-Keep-track-of-hardware-path-of-graphics.patch patches.suse/octeontx2-pf-replace-bitmap_weight-with-bitmap_empty.patch patches.suse/drm-amd-pm-use-bitmap_-from-to-_arr32-where-appropri.patch patches.suse/cifs-fix-potential-double-free-during-failed-mount.patch @@ -13316,6 +13331,7 @@ patches.suse/powerpc-Enable-execve-syscall-exit-tracepoint.patch patches.suse/powerpc-rtas-Allow-ibm-platform-dump-RTAS-call-with-.patch patches.suse/powerpc-powernv-wire-up-rng-during-setup_arch.patch + patches.suse/0008-parisc-stifb-Fix-fb_is_primary_device-only-available.patch patches.suse/video-fbdev-pxa3xx-gcu-Fix-integer-overflow-in-pxa3x.patch patches.suse/ARM-dts-imx7-Move-hsic_phy-power-domain-to-HSIC-PHY-.patch patches.suse/ARM-dts-imx6qdl-correct-PU-regulator-ramp-delay.patch @@ -13472,7 +13488,7 @@ patches.suse/x86-Undo-return-thunk-damage.patch patches.suse/x86-objtool-Create-.return_sites.patch patches.suse/x86-static_call-Use-alternative-RET-encoding.patch - patches.suse/x86-ftrace-Use-alternative-RET-encoding.patch + patches.suse/x86-ftrace-use-alternative-ret-encoding.patch patches.suse/x86-bpf-Use-alternative-RET-encoding.patch patches.suse/x86-kvm-Fix-SETcc-emulation-for-return-thunks.patch patches.suse/x86-vsyscall_emu-64-Don-t-use-RET-in-vsyscall-emulation.patch @@ -13841,11 +13857,15 @@ patches.suse/i2c-mux-gpmux-Add-of_node_put-when-breaking-out-of-l.patch patches.suse/media-atmel-atmel-sama7g5-isc-fix-warning-in-configs.patch patches.suse/media-tw686x-Register-the-irq-at-the-end-of-probe.patch + patches.suse/media-imx-jpeg-Correct-some-definition-according-spe.patch + patches.suse/media-imx-jpeg-Leave-a-blank-space-before-the-config.patch patches.suse/media-pvrusb2-fix-memory-leak-in-pvr_probe.patch + patches.suse/media-imx-jpeg-Disable-slot-interrupt-when-frame-don.patch patches.suse/media-hdpvr-fix-error-value-returns-in-hdpvr_read.patch patches.suse/media-v4l2-mem2mem-prevent-pollerr-when-last_buffer_.patch patches.suse/media-driver-nxp-imx-jpeg-fix-a-unexpected-return-va.patch patches.suse/media-tw686x-Fix-memory-leak-in-tw686x_video_init.patch + patches.suse/media-platform-mtk-mdp-Fix-mdp_ipi_comm-structure-al.patch patches.suse/media-PATCH-pci-atomisp_cmd-fix-three-missing-checks.patch patches.suse/media-cedrus-h265-Fix-flag-name.patch patches.suse/media-cedrus-hevc-Add-check-for-invalid-timestamp.patch @@ -13857,6 +13877,7 @@ patches.suse/virtio-gpu-fix-a-missing-check-to-avoid-NULL-derefer.patch patches.suse/udmabuf-Set-the-DMA-mask-for-the-udmabuf-device-v2.patch patches.suse/drm-adv7511-override-i2c-address-of-cec-before-acces.patch + patches.suse/0009-fbcon-Fix-accelerated-fbdev-scrolling-while-logo-is-.patch patches.suse/fbcon-Fix-boundary-checks-for-fbcon-vc-n1-n2-paramet.patch patches.suse/drm-bridge-adv7511-Add-check-for-mipi_dsi_driver_reg.patch patches.suse/drm-mcde-Fix-refcount-leak-in-mcde_dsi_bind.patch @@ -14781,6 +14802,41 @@ patches.suse/media-dvb_vb2-fix-possible-out-of-bound-access.patch patches.suse/media-rkvdec-Disable-H.264-error-detection.patch patches.suse/usb-typec-ucsi-Remove-incorrect-warning.patch + patches.suse/wifi-rtlwifi-8192de-correct-checking-of-IQK-reload.patch + patches.suse/wifi-mac80211-allow-bw-change-during-channel-switch-.patch + patches.suse/net-thunderbolt-Enable-DMA-paths-only-after-rings-ar.patch + patches.suse/wifi-ath10k-add-peer-map-clean-up-for-peer-delete-in.patch + patches.suse/wifi-rtl8xxxu-tighten-bounds-checking-in-rtl8xxxu_re.patch + patches.suse/wifi-rtw88-add-missing-destroy_workqueue-on-error-pa.patch + patches.suse/can-rx-offload-can_rx_offload_init_queue-fix-typo.patch + patches.suse/wifi-rtl8xxxu-Fix-skb-misuse-in-TX-queue-selection.patch + patches.suse/wifi-rtl8xxxu-gen2-Fix-mistake-in-path-B-IQ-calibrat.patch + patches.suse/wifi-rtl8xxxu-Remove-copy-paste-leftover-in-gen2_upd.patch + patches.suse/mwifiex-fix-sleep-in-atomic-context-bugs-caused-by-d.patch + patches.suse/wifi-mt76-sdio-fix-transmitting-packet-hangs.patch + patches.suse/wifi-mt76-mt7615-add-mt7615_mutex_acquire-release-in.patch + patches.suse/wifi-mt76-mt7915-do-not-check-state-before-configuri.patch + patches.suse/wifi-ath11k-fix-number-of-VHT-beamformee-spatial-str.patch + patches.suse/wifi-rtl8xxxu-Fix-AIFS-written-to-REG_EDCA_-_PARAM.patch + patches.suse/wifi-rtl8xxxu-Improve-rtl8xxxu_queue_select.patch + patches.suse/Bluetooth-btusb-mediatek-fix-WMT-failure-during-runt.patch + patches.suse/Bluetooth-hci_-ldisc-serdev-check-percpu_init_rwsem-.patch + patches.suse/Bluetooth-hci_core-Fix-not-handling-link-timeouts-pr.patch + patches.suse/vhost-vsock-Use-kvmalloc-kvfree-for-larger-packets.patch + patches.suse/eth-alx-take-rtnl_lock-on-resume.patch + patches.suse/mISDN-fix-use-after-free-bugs-in-l1oip-timer-handler.patch + patches.suse/net-wwan-iosm-Call-mutex_init-before-locking-it.patch + patches.suse/i2c-mlxbf-support-lock-mechanism.patch + patches.suse/hwmon-gsc-hwmon-Call-of_node_get-before-of_find_xxx-.patch + patches.suse/hwmon-pmbus-mp2888-Fix-sensors-readouts-for-MPS-Mult.patch + patches.suse/regulator-qcom_rpm-Fix-circular-deferral-regression.patch + patches.suse/spi-mt7621-Fix-an-error-message-in-mt7621_spi_probe.patch + patches.suse/spi-qup-add-missing-clk_disable_unprepare-on-error-i.patch + patches.suse/spi-qup-add-missing-clk_disable_unprepare-on-error-i-494a22765ce4.patch + patches.suse/spi-meson-spicc-do-not-rely-on-busy-flag-in-pow2-clk.patch + patches.suse/spi-dw-Fix-PM-disable-depth-imbalance-in-dw_spi_bt1_.patch + patches.suse/spi-omap100k-Fix-PM-disable-depth-imbalance-in-omap1.patch + patches.suse/spi-s3c64xx-Fix-large-transfers-with-DMA.patch # powerpc/linux next patches.suse/Revert-powerpc-rtas-Implement-reentrant-rtas-call.patch