summaryrefslogtreecommitdiff
path: root/debian/patches/0802-fix-temp-read-parameters.patch
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2024-11-14 15:08:48 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2024-11-14 15:08:48 +0100
commita0ef7483cccfcab42e635d72c9a537cf6a778893 (patch)
tree5f4b98f575ad0d150b6ac73765a22b6fab679bdb /debian/patches/0802-fix-temp-read-parameters.patch
parent686fa8c1c7328b9e20df2cdbb97b5d7cd30d70ba (diff)
parent8ebf7ba18b07deaae1ddd83f9943acd3413e8eb2 (diff)
Diffstat (limited to 'debian/patches/0802-fix-temp-read-parameters.patch')
-rw-r--r--debian/patches/0802-fix-temp-read-parameters.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/debian/patches/0802-fix-temp-read-parameters.patch b/debian/patches/0802-fix-temp-read-parameters.patch
new file mode 100644
index 0000000..1672d25
--- /dev/null
+++ b/debian/patches/0802-fix-temp-read-parameters.patch
@@ -0,0 +1,59 @@
+From ab5ce5baff097ebb6e2a17a171858be213ee68d3 Mon Sep 17 00:00:00 2001
+From: Thang Tran <thuutran@amperecomputing.com>
+Date: Tue, 11 Jul 2023 17:27:12 +0700
+Subject: [PATCH] dcmi: update parameters to read temperature sensors
+
+Issue:
+When the system has number of CPU temperature sensors more than 8,
+"ipmitool dcmi get_temp_reading" can not show all of sensors.
+
+Root cause:
+To request to read multiple sensors for each message, ipmitool has to
+send "Get Temperature Readings" command with the "Entity Instance" always
+0 and the "Entity Instance Start" as the offset. But the current code is
+sending "Entity Instance" is offset and "Entity Instance Start" always is
+0. It makes ipmitool only read 1 sensor each time. Besides that, the
+"Entity Instance Start" value starts from 1 (not 0), therefore, the
+initialization has to be set to 1.
+
+Solution:
+This commit corrects the order of parameters and the initialization of
+"Entity Instance Start" byte.
+
+Resolves ipmitool/ipmitool#3
+
+Tested:
+1. Update BMC software to support 24 CPU temperature sensors
+2. Request to read the temperature sensors
+$ipmitool dcmi get_temp_reading
+3. Display full 24 CPU temperature sensors.
+
+Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
+Forwarded: not-needed
+Applied-Upstream: https://codeberg.org/IPMITool/ipmitool/commit/ab5ce5baff097ebb6e2a17a171858be213ee68d3
+---
+ lib/ipmi_dcmi.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/ipmi_dcmi.c b/lib/ipmi_dcmi.c
+index 8ed87a9..8cf6d66 100644
+--- a/lib/ipmi_dcmi.c
++++ b/lib/ipmi_dcmi.c
+@@ -1595,7 +1595,7 @@ ipmi_dcmi_prnt_get_temp_readings(struct ipmi_intf * intf)
+ continue;
+ }
+ /* Total number of available instances for the Entity ID */
+- offset = 0;
++ offset = 1;
+ tota_inst = rsp->data[1];
+ while (tota_inst > 0) {
+ get_inst = ((tota_inst / DCMI_MAX_BYTE_TEMP_READ_SIZE) ?
+@@ -1603,7 +1603,7 @@ ipmi_dcmi_prnt_get_temp_readings(struct ipmi_intf * intf)
+ (tota_inst % DCMI_MAX_BYTE_TEMP_READ_SIZE));
+ rsp = ipmi_dcmi_get_temp_readings(intf,
+ dcmi_temp_read_vals[i].val,
+- offset, 0);
++ 0, offset);
+ if (chk_rsp(rsp)) {
+ continue;
+ }