diff --git a/packages/base/any/kernels/4.9-lts/patches/0023-hwmon-pmbus-Fix-driver-info-initialization-in-probe-.patch b/packages/base/any/kernels/4.9-lts/patches/0023-hwmon-pmbus-Fix-driver-info-initialization-in-probe-.patch new file mode 100644 index 00000000..261c5f89 --- /dev/null +++ b/packages/base/any/kernels/4.9-lts/patches/0023-hwmon-pmbus-Fix-driver-info-initialization-in-probe-.patch @@ -0,0 +1,42 @@ +From 81443e4927ec84223f8305e0e4cec647521856e4 Mon Sep 17 00:00:00 2001 +From: Vadim Pasternak +Date: Mon, 21 Jan 2019 14:54:58 +0000 +Subject: [PATCH hwmon] hwmon: (pmbus) Fix driver info initialization in probe + routine + +Fix tps53679_probe() by using dynamically allocated ?pmbus_driver_info? +structure instead of static. Usage of static structures causes +overwritten of the field ?vrm_version? - when the number of tps53679 +devices with the different ?vrm_version? are used within the same +system, the last probed device overwrites this field for all others. + +Fixes: 610526527a13e4c9 ("hwmon: (pmbus) Add support for Texas Instruments tps53679 device") +Signed-off-by: Vadim Pasternak +--- + drivers/hwmon/pmbus/tps53679.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/drivers/hwmon/pmbus/tps53679.c b/drivers/hwmon/pmbus/tps53679.c +index 85b515c..45eacc5 100644 +--- a/drivers/hwmon/pmbus/tps53679.c ++++ b/drivers/hwmon/pmbus/tps53679.c +@@ -80,7 +80,15 @@ static struct pmbus_driver_info tps53679_info = { + static int tps53679_probe(struct i2c_client *client, + const struct i2c_device_id *id) + { +- return pmbus_do_probe(client, id, &tps53679_info); ++ struct pmbus_driver_info *info; ++ ++ info = devm_kzalloc(&client->dev, sizeof(*info), GFP_KERNEL); ++ if (!info) ++ return -ENOMEM; ++ ++ memcpy(info, &tps53679_info, sizeof(*info)); ++ ++ return pmbus_do_probe(client, id, info); + } + + static const struct i2c_device_id tps53679_id[] = { +-- +2.1.4 + diff --git a/packages/base/any/kernels/4.9-lts/patches/0024-mlxsw-thermal-disable-highest-zone-calculation.patch b/packages/base/any/kernels/4.9-lts/patches/0024-mlxsw-thermal-disable-highest-zone-calculation.patch new file mode 100644 index 00000000..830e1ae5 --- /dev/null +++ b/packages/base/any/kernels/4.9-lts/patches/0024-mlxsw-thermal-disable-highest-zone-calculation.patch @@ -0,0 +1,35 @@ +From 5da6a599af1072f278b5f41ed648bed2142d42f0 Mon Sep 17 00:00:00 2001 +From: Vadim Pasternak +Date: Mon, 21 Jan 2019 19:13:29 +0000 +Subject: [PATCH mlxsw] mlxsw thermal: disable highest zone calculation + +Signed-off-by: Vadim Pasternak +--- + drivers/net/ethernet/mellanox/mlxsw/core_thermal.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c +index 444455c..0a2e7a2 100644 +--- a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c ++++ b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c +@@ -433,7 +433,7 @@ static int mlxsw_thermal_get_temp(struct thermal_zone_device *tzdev, + return err; + } + mlxsw_reg_mtmp_unpack(mtmp_pl, &temp, NULL, NULL); +- ++#if 0 + if (thermal->tz_module_arr) { + err = mlxsw_thermal_highest_tz_notify(dev, tzdev, thermal, + thermal->tz_module_num, +@@ -441,7 +441,7 @@ static int mlxsw_thermal_get_temp(struct thermal_zone_device *tzdev, + if (err) + dev_err(dev, "Failed to query module temp sensor\n"); + } +- ++#endif + *p_temp = (int) temp; + return 0; + } +-- +2.1.4 + diff --git a/packages/base/any/kernels/4.9-lts/patches/series b/packages/base/any/kernels/4.9-lts/patches/series index 22527ddb..073c0224 100644 --- a/packages/base/any/kernels/4.9-lts/patches/series +++ b/packages/base/any/kernels/4.9-lts/patches/series @@ -21,3 +21,5 @@ driver-add-the-support-max6620.patch 0018-mlxsw-thermal-monitoring-amendments.patch 0020-mlxsw-qsfp_sysfs-Support-port-numbers-initialization.patch 0021-mlxsw-Align-code-with-kernel-v-5.0.patch +0023-hwmon-pmbus-Fix-driver-info-initialization-in-probe-.patch +0024-mlxsw-thermal-disable-highest-zone-calculation.patch