diff options
author | Laura Abbott <labbott@fedoraproject.org> | 2017-11-01 08:04:54 -0700 |
---|---|---|
committer | Laura Abbott <labbott@fedoraproject.org> | 2017-11-01 08:11:12 -0700 |
commit | 2dc72b4c2bac9fdc06b56cf2b4d56483f05d44b4 (patch) | |
tree | 7218dd2d4feddbf22632586b70f3d67d482eb0f5 | |
parent | 0b2f4649840f7fb349bcfe10378a85bfc9e448a2 (diff) | |
download | kernel-2dc72b4c2bac9fdc06b56cf2b4d56483f05d44b4.tar.gz kernel-2dc72b4c2bac9fdc06b56cf2b4d56483f05d44b4.tar.xz kernel-2dc72b4c2bac9fdc06b56cf2b4d56483f05d44b4.zip |
Add fix for potential mlxsw firmware incompatibility
Originally from Ido Schimmel <idosch@mellanox.com>
-rw-r--r-- | kernel.spec | 6 | ||||
-rw-r--r-- | net-mlxsw-reg-Add-high-and-low-temperature-thresholds.patch | 79 |
2 files changed, 85 insertions, 0 deletions
diff --git a/kernel.spec b/kernel.spec index e1a88cbbc..3408a0fb5 100644 --- a/kernel.spec +++ b/kernel.spec @@ -688,6 +688,9 @@ Patch630: Input-synaptics---Disable-kernel-tracking-on-SMBus-devices.patch # Headed upstream Patch631: drm-i915-boost-GPU-clocks-if-we-miss-the-pageflip.patch +# http://patchwork.ozlabs.org/patch/831938/ +Patch633: net-mlxsw-reg-Add-high-and-low-temperature-thresholds.patch + # END OF PATCH DEFINITIONS %endif @@ -2262,6 +2265,9 @@ fi # # %changelog +* Wed Nov 01 2017 Laura Abbott <labbott@fedoraproject.org> +- Add fix for potential mlxsw firmware incompatibility + * Fri Oct 27 2017 Jeremy Cline <jeremy@jcline.org> - 4.13.10-200 - Linux v4.13.10 diff --git a/net-mlxsw-reg-Add-high-and-low-temperature-thresholds.patch b/net-mlxsw-reg-Add-high-and-low-temperature-thresholds.patch new file mode 100644 index 000000000..957200e17 --- /dev/null +++ b/net-mlxsw-reg-Add-high-and-low-temperature-thresholds.patch @@ -0,0 +1,79 @@ +From patchwork Mon Oct 30 09:51:18 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [net] mlxsw: reg: Add high and low temperature thresholds +X-Patchwork-Submitter: Jiri Pirko <jiri@resnulli.us> +X-Patchwork-Id: 831938 +X-Patchwork-Delegate: davem@davemloft.net +Message-Id: <20171030095118.9098-1-jiri@resnulli.us> +To: netdev@vger.kernel.org +Cc: davem@davemloft.net, idosch@mellanox.com, mlxsw@mellanox.com +Date: Mon, 30 Oct 2017 10:51:18 +0100 +From: Jiri Pirko <jiri@resnulli.us> +List-Id: <netdev.vger.kernel.org> + +From: Ido Schimmel <idosch@mellanox.com> + +The ASIC has the ability to generate events whenever a sensor indicates +the temperature goes above or below its high or low thresholds, +respectively. + +In new firmware versions the firmware enforces a minimum of 5 +degrees Celsius difference between both thresholds. Make the driver +conform to this requirement. + +Note that this is required even when the events are disabled, as in +certain systems interrupts are generated via GPIO based on these +thresholds. + +Fixes: 85926f877040 ("mlxsw: reg: Add definition of temperature management registers") +Signed-off-by: Ido Schimmel <idosch@mellanox.com> +Signed-off-by: Jiri Pirko <jiri@mellanox.com> +--- + drivers/net/ethernet/mellanox/mlxsw/reg.h | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h +index 4afc848..5acfbe5 100644 +--- a/drivers/net/ethernet/mellanox/mlxsw/reg.h ++++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h +@@ -5827,6 +5827,29 @@ MLXSW_ITEM32(reg, mtmp, mtr, 0x08, 30, 1); + */ + MLXSW_ITEM32(reg, mtmp, max_temperature, 0x08, 0, 16); + ++/* reg_mtmp_tee ++ * Temperature Event Enable. ++ * 0 - Do not generate event ++ * 1 - Generate event ++ * 2 - Generate single event ++ * Access: RW ++ */ ++MLXSW_ITEM32(reg, mtmp, tee, 0x0C, 30, 2); ++ ++#define MLXSW_REG_MTMP_THRESH_HI 0x348 /* 105 Celsius */ ++ ++/* reg_mtmp_temperature_threshold_hi ++ * High threshold for Temperature Warning Event. In 0.125 Celsius. ++ * Access: RW ++ */ ++MLXSW_ITEM32(reg, mtmp, temperature_threshold_hi, 0x0C, 0, 16); ++ ++/* reg_mtmp_temperature_threshold_lo ++ * Low threshold for Temperature Warning Event. In 0.125 Celsius. ++ * Access: RW ++ */ ++MLXSW_ITEM32(reg, mtmp, temperature_threshold_lo, 0x10, 0, 16); ++ + #define MLXSW_REG_MTMP_SENSOR_NAME_SIZE 8 + + /* reg_mtmp_sensor_name +@@ -5843,6 +5866,8 @@ static inline void mlxsw_reg_mtmp_pack(char *payload, u8 sensor_index, + mlxsw_reg_mtmp_sensor_index_set(payload, sensor_index); + mlxsw_reg_mtmp_mte_set(payload, max_temp_enable); + mlxsw_reg_mtmp_mtr_set(payload, max_temp_reset); ++ mlxsw_reg_mtmp_temperature_threshold_hi_set(payload, ++ MLXSW_REG_MTMP_THRESH_HI); + } + + static inline void mlxsw_reg_mtmp_unpack(char *payload, unsigned int *p_temp, |