Home Home > GIT Browse > SLE12-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-07-18 08:26:13 +0200
committerJiri Slaby <jslaby@suse.cz>2019-07-18 08:51:16 +0200
commit20fe9aa7b3fb10c2fc0bb58585cdb272a9883657 (patch)
tree3246213b89823e9a1da5cf9f96c0f4060aa3e670
parent187af5acf5ad2298218938a66776e34cab0ddb90 (diff)
net/mlx4_en: ethtool, Remove unsupported SFP EEPROM high pages
query (networking-stable-19_06_09).
-rw-r--r--patches.suse/net-mlx4_en-ethtool-Remove-unsupported-SFP-EEPROM-hi.patch58
-rw-r--r--series.conf1
2 files changed, 59 insertions, 0 deletions
diff --git a/patches.suse/net-mlx4_en-ethtool-Remove-unsupported-SFP-EEPROM-hi.patch b/patches.suse/net-mlx4_en-ethtool-Remove-unsupported-SFP-EEPROM-hi.patch
new file mode 100644
index 0000000000..0df24c5c40
--- /dev/null
+++ b/patches.suse/net-mlx4_en-ethtool-Remove-unsupported-SFP-EEPROM-hi.patch
@@ -0,0 +1,58 @@
+From: Erez Alfasi <ereza@mellanox.com>
+Date: Mon, 20 May 2019 17:42:52 +0300
+Subject: net/mlx4_en: ethtool, Remove unsupported SFP EEPROM high pages query
+Git-commit: 135dd9594f127c8a82d141c3c8430e9e2143216a
+Patch-mainline: 5.2-rc2
+References: networking-stable-19_06_09
+
+Querying EEPROM high pages data for SFP module is currently
+not supported by our driver but is still tried, resulting in
+invalid FW queries.
+
+Set the EEPROM ethtool data length to 256 for SFP module to
+limit the reading for page 0 only and prevent invalid FW queries.
+
+Fixes: 7202da8b7f71 ("ethtool, net/mlx4_en: Cable info, get_module_info/eeprom ethtool support")
+Signed-off-by: Erez Alfasi <ereza@mellanox.com>
+Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 4 +++-
+ drivers/net/ethernet/mellanox/mlx4/port.c | 5 -----
+ 2 files changed, 3 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
++++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
+@@ -1982,6 +1982,8 @@ static int mlx4_en_set_tunable(struct ne
+ return ret;
+ }
+
++#define MLX4_EEPROM_PAGE_LEN 256
++
+ static int mlx4_en_get_module_info(struct net_device *dev,
+ struct ethtool_modinfo *modinfo)
+ {
+@@ -2016,7 +2018,7 @@ static int mlx4_en_get_module_info(struc
+ break;
+ case MLX4_MODULE_ID_SFP:
+ modinfo->type = ETH_MODULE_SFF_8472;
+- modinfo->eeprom_len = ETH_MODULE_SFF_8472_LEN;
++ modinfo->eeprom_len = MLX4_EEPROM_PAGE_LEN;
+ break;
+ default:
+ return -EINVAL;
+--- a/drivers/net/ethernet/mellanox/mlx4/port.c
++++ b/drivers/net/ethernet/mellanox/mlx4/port.c
+@@ -2077,11 +2077,6 @@ int mlx4_get_module_info(struct mlx4_dev
+ size -= offset + size - I2C_PAGE_SIZE;
+
+ i2c_addr = I2C_ADDR_LOW;
+- if (offset >= I2C_PAGE_SIZE) {
+- /* Reset offset to high page */
+- i2c_addr = I2C_ADDR_HIGH;
+- offset -= I2C_PAGE_SIZE;
+- }
+
+ cable_info = (struct mlx4_cable_info *)inmad->data;
+ cable_info->dev_mem_address = cpu_to_be16(offset);
diff --git a/series.conf b/series.conf
index 712e17a030..ad139d5628 100644
--- a/series.conf
+++ b/series.conf
@@ -22624,6 +22624,7 @@
patches.suse/btrfs-tree-checker-detect-file-extent-items-with-ove.patch
patches.fixes/crypto-vmx-CTR-always-increment-IV-as-quadword.patch
patches.arch/crypto-vmx-ghash-do-nosimd-fallback-manually.patch
+ patches.suse/net-mlx4_en-ethtool-Remove-unsupported-SFP-EEPROM-hi.patch
patches.drivers/usbnet-ipheth-fix-racing-condition.patch
patches.suse/ipv6-Consider-sk_bound_dev_if-when-binding-a-raw-soc.patch
patches.drivers/usbnet-fix-kernel-crash-after-disconnect.patch