Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tbogendoerfer@suse.de>2019-11-05 14:08:48 +0100
committerThomas Bogendoerfer <tbogendoerfer@suse.de>2019-11-05 14:09:51 +0100
commitea73ee0adf4a501126177b02397a10fd49e4148d (patch)
tree93dcc38a0959c0e019ea93f8740e24cb3020dfe7
parent7b2f710a61e90329687f49e3c8770d7840a61e45 (diff)
net/mlx5e: Initialize on stack link modes bitmap (jsc#SLE-8464).
-rw-r--r--patches.suse/net-mlx5e-Initialize-on-stack-link-modes-bitmap.patch29
-rw-r--r--series.conf1
2 files changed, 30 insertions, 0 deletions
diff --git a/patches.suse/net-mlx5e-Initialize-on-stack-link-modes-bitmap.patch b/patches.suse/net-mlx5e-Initialize-on-stack-link-modes-bitmap.patch
new file mode 100644
index 0000000000..f9c7ac8726
--- /dev/null
+++ b/patches.suse/net-mlx5e-Initialize-on-stack-link-modes-bitmap.patch
@@ -0,0 +1,29 @@
+From: Aya Levin <ayal@mellanox.com>
+Date: Wed, 23 Oct 2019 12:57:54 +0300
+Subject: net/mlx5e: Initialize on stack link modes bitmap
+Patch-mainline: v5.4-rc6
+Git-commit: 926b37f76fb0a22fe93c8873c819fd167180e85c
+References: jsc#SLE-8464
+
+Initialize link modes bitmap on stack before using it, otherwise the
+outcome of ethtool set link ksettings might have unexpected values.
+
+Fixes: 4b95840a6ced ("net/mlx5e: Fix matching of speed to PRM link modes")
+Signed-off-by: Aya Levin <ayal@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+@@ -1021,7 +1021,7 @@ static bool ext_link_mode_requested(cons
+ {
+ #define MLX5E_MIN_PTYS_EXT_LINK_MODE_BIT ETHTOOL_LINK_MODE_50000baseKR_Full_BIT
+ int size = __ETHTOOL_LINK_MODE_MASK_NBITS - MLX5E_MIN_PTYS_EXT_LINK_MODE_BIT;
+- __ETHTOOL_DECLARE_LINK_MODE_MASK(modes);
++ __ETHTOOL_DECLARE_LINK_MODE_MASK(modes) = {0,};
+
+ bitmap_set(modes, MLX5E_MIN_PTYS_EXT_LINK_MODE_BIT, size);
+ return bitmap_intersects(modes, adver, __ETHTOOL_LINK_MODE_MASK_NBITS);
diff --git a/series.conf b/series.conf
index fdac26686e..6adac29318 100644
--- a/series.conf
+++ b/series.conf
@@ -2880,6 +2880,7 @@
patches.suse/net-mlx5e-Don-t-store-direct-pointer-to-action-s-tun.patch
patches.suse/net-mlx5e-Fix-handling-of-compressed-CQEs-in-case-of.patch
patches.suse/net-mlx5e-Fix-ethtool-self-test-link-speed.patch
+ patches.suse/net-mlx5e-Initialize-on-stack-link-modes-bitmap.patch
patches.suse/powerpc-powernv-Fix-CPU-idle-to-be-called-with-IRQs-.patch
patches.suse/scsi-qla2xxx-fixup-incorrect-usage-of-host_byte.patch
patches.suse/scsi-lpfc-Check-queue-pointer-before-use.patch