]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 12:48:53 +0000 (14:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 12:48:53 +0000 (14:48 +0200)
added patches:
bnx2x-fix-enabling-network-interfaces-without-vfs.patch
pm-base-power-don-t-try-to-use-non-existing-rtc-for-storing-data.patch
xen-reset-legacy-rtc-flag-for-pv-domu.patch

queue-4.14/bnx2x-fix-enabling-network-interfaces-without-vfs.patch [new file with mode: 0644]
queue-4.14/pm-base-power-don-t-try-to-use-non-existing-rtc-for-storing-data.patch [new file with mode: 0644]
queue-4.14/series
queue-4.14/xen-reset-legacy-rtc-flag-for-pv-domu.patch [new file with mode: 0644]

diff --git a/queue-4.14/bnx2x-fix-enabling-network-interfaces-without-vfs.patch b/queue-4.14/bnx2x-fix-enabling-network-interfaces-without-vfs.patch
new file mode 100644 (file)
index 0000000..9d6bde3
--- /dev/null
@@ -0,0 +1,36 @@
+From 52ce14c134a003fee03d8fc57442c05a55b53715 Mon Sep 17 00:00:00 2001
+From: Adrian Bunk <bunk@kernel.org>
+Date: Sun, 12 Sep 2021 22:05:23 +0300
+Subject: bnx2x: Fix enabling network interfaces without VFs
+
+From: Adrian Bunk <bunk@kernel.org>
+
+commit 52ce14c134a003fee03d8fc57442c05a55b53715 upstream.
+
+This function is called to enable SR-IOV when available,
+not enabling interfaces without VFs was a regression.
+
+Fixes: 65161c35554f ("bnx2x: Fix missing error code in bnx2x_iov_init_one()")
+Signed-off-by: Adrian Bunk <bunk@kernel.org>
+Reported-by: YunQiang Su <wzssyqa@gmail.com>
+Tested-by: YunQiang Su <wzssyqa@gmail.com>
+Cc: stable@vger.kernel.org
+Acked-by: Shai Malin <smalin@marvell.com>
+Link: https://lore.kernel.org/r/20210912190523.27991-1-bunk@kernel.org
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+@@ -1243,7 +1243,7 @@ int bnx2x_iov_init_one(struct bnx2x *bp,
+       /* SR-IOV capability was enabled but there are no VFs*/
+       if (iov->total == 0) {
+-              err = -EINVAL;
++              err = 0;
+               goto failed;
+       }
diff --git a/queue-4.14/pm-base-power-don-t-try-to-use-non-existing-rtc-for-storing-data.patch b/queue-4.14/pm-base-power-don-t-try-to-use-non-existing-rtc-for-storing-data.patch
new file mode 100644 (file)
index 0000000..5c1c9d1
--- /dev/null
@@ -0,0 +1,62 @@
+From 0560204b360a332c321124dbc5cdfd3364533a74 Mon Sep 17 00:00:00 2001
+From: Juergen Gross <jgross@suse.com>
+Date: Fri, 3 Sep 2021 10:49:36 +0200
+Subject: PM: base: power: don't try to use non-existing RTC for storing data
+
+From: Juergen Gross <jgross@suse.com>
+
+commit 0560204b360a332c321124dbc5cdfd3364533a74 upstream.
+
+If there is no legacy RTC device, don't try to use it for storing trace
+data across suspend/resume.
+
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Reviewed-by: Rafael J. Wysocki <rafael@kernel.org>
+Link: https://lore.kernel.org/r/20210903084937.19392-2-jgross@suse.com
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/base/power/trace.c |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- a/drivers/base/power/trace.c
++++ b/drivers/base/power/trace.c
+@@ -11,6 +11,7 @@
+ #include <linux/export.h>
+ #include <linux/rtc.h>
+ #include <linux/suspend.h>
++#include <linux/init.h>
+ #include <linux/mc146818rtc.h>
+@@ -165,6 +166,9 @@ void generate_pm_trace(const void *trace
+       const char *file = *(const char **)(tracedata + 2);
+       unsigned int user_hash_value, file_hash_value;
++      if (!x86_platform.legacy.rtc)
++              return;
++
+       user_hash_value = user % USERHASH;
+       file_hash_value = hash_string(lineno, file, FILEHASH);
+       set_magic_time(user_hash_value, file_hash_value, dev_hash_value);
+@@ -267,6 +271,9 @@ static struct notifier_block pm_trace_nb
+ static int early_resume_init(void)
+ {
++      if (!x86_platform.legacy.rtc)
++              return 0;
++
+       hash_value_early_read = read_magic_time();
+       register_pm_notifier(&pm_trace_nb);
+       return 0;
+@@ -277,6 +284,9 @@ static int late_resume_init(void)
+       unsigned int val = hash_value_early_read;
+       unsigned int user, file, dev;
++      if (!x86_platform.legacy.rtc)
++              return 0;
++
+       user = val % USERHASH;
+       val = val / USERHASH;
+       file = val % FILEHASH;
index 8e700f82908d89618ddbfe6745de1dada42bade7..e00aac01ef1ceb715feb2caf3ca67335cd170b70 100644 (file)
@@ -188,3 +188,6 @@ cpufreq-powernv-fix-init_chip_info-initialization-in-numa-off.patch
 mm-hugetlb-initialize-hugetlb_usage-in-mm_init.patch
 memcg-enable-accounting-for-pids-in-nested-pid-namespaces.patch
 platform-chrome-cros_ec_proto-send-command-again-when-timeout-occurs.patch
+xen-reset-legacy-rtc-flag-for-pv-domu.patch
+bnx2x-fix-enabling-network-interfaces-without-vfs.patch
+pm-base-power-don-t-try-to-use-non-existing-rtc-for-storing-data.patch
diff --git a/queue-4.14/xen-reset-legacy-rtc-flag-for-pv-domu.patch b/queue-4.14/xen-reset-legacy-rtc-flag-for-pv-domu.patch
new file mode 100644 (file)
index 0000000..1f986ac
--- /dev/null
@@ -0,0 +1,71 @@
+From f68aa100d815b5b4467fd1c3abbe3b99d65fd028 Mon Sep 17 00:00:00 2001
+From: Juergen Gross <jgross@suse.com>
+Date: Fri, 3 Sep 2021 10:49:37 +0200
+Subject: xen: reset legacy rtc flag for PV domU
+
+From: Juergen Gross <jgross@suse.com>
+
+commit f68aa100d815b5b4467fd1c3abbe3b99d65fd028 upstream.
+
+A Xen PV guest doesn't have a legacy RTC device, so reset the legacy
+RTC flag. Otherwise the following WARN splat will occur at boot:
+
+[    1.333404] WARNING: CPU: 1 PID: 1 at /home/gross/linux/head/drivers/rtc/rtc-mc146818-lib.c:25 mc146818_get_time+0x1be/0x210
+[    1.333404] Modules linked in:
+[    1.333404] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G        W         5.14.0-rc7-default+ #282
+[    1.333404] RIP: e030:mc146818_get_time+0x1be/0x210
+[    1.333404] Code: c0 64 01 c5 83 fd 45 89 6b 14 7f 06 83 c5 64 89 6b 14 41 83 ec 01 b8 02 00 00 00 44 89 63 10 5b 5d 41 5c 41 5d 41 5e 41 5f c3 <0f> 0b 48 c7 c7 30 0e ef 82 4c 89 e6 e8 71 2a 24 00 48 c7 c0 ff ff
+[    1.333404] RSP: e02b:ffffc90040093df8 EFLAGS: 00010002
+[    1.333404] RAX: 00000000000000ff RBX: ffffc90040093e34 RCX: 0000000000000000
+[    1.333404] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 000000000000000d
+[    1.333404] RBP: ffffffff82ef0e30 R08: ffff888005013e60 R09: 0000000000000000
+[    1.333404] R10: ffffffff82373e9b R11: 0000000000033080 R12: 0000000000000200
+[    1.333404] R13: 0000000000000000 R14: 0000000000000002 R15: ffffffff82cdc6d4
+[    1.333404] FS:  0000000000000000(0000) GS:ffff88807d440000(0000) knlGS:0000000000000000
+[    1.333404] CS:  10000e030 DS: 0000 ES: 0000 CR0: 0000000080050033
+[    1.333404] CR2: 0000000000000000 CR3: 000000000260a000 CR4: 0000000000050660
+[    1.333404] Call Trace:
+[    1.333404]  ? wakeup_sources_sysfs_init+0x30/0x30
+[    1.333404]  ? rdinit_setup+0x2b/0x2b
+[    1.333404]  early_resume_init+0x23/0xa4
+[    1.333404]  ? cn_proc_init+0x36/0x36
+[    1.333404]  do_one_initcall+0x3e/0x200
+[    1.333404]  kernel_init_freeable+0x232/0x28e
+[    1.333404]  ? rest_init+0xd0/0xd0
+[    1.333404]  kernel_init+0x16/0x120
+[    1.333404]  ret_from_fork+0x1f/0x30
+
+Cc: <stable@vger.kernel.org>
+Fixes: 8d152e7a5c7537 ("x86/rtc: Replace paravirt rtc check with platform legacy quirk")
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
+Link: https://lore.kernel.org/r/20210903084937.19392-3-jgross@suse.com
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/xen/enlighten_pv.c |    7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/arch/x86/xen/enlighten_pv.c
++++ b/arch/x86/xen/enlighten_pv.c
+@@ -1214,6 +1214,11 @@ static void __init xen_dom0_set_legacy_f
+       x86_platform.legacy.rtc = 1;
+ }
++static void __init xen_domu_set_legacy_features(void)
++{
++      x86_platform.legacy.rtc = 0;
++}
++
+ /* First C function to be called on Xen boot */
+ asmlinkage __visible void __init xen_start_kernel(void)
+ {
+@@ -1375,6 +1380,8 @@ asmlinkage __visible void __init xen_sta
+               add_preferred_console("hvc", 0, NULL);
+               if (pci_xen)
+                       x86_init.pci.arch_init = pci_xen_init;
++              x86_platform.set_legacy_features =
++                              xen_domu_set_legacy_features;
+       } else {
+               const struct dom0_vga_console_info *info =
+                       (void *)((char *)xen_start_info +