Merge ~mitchellaugustin/ubuntu/+source/ipmitool:ubuntu/plucky-devel into ubuntu/+source/ipmitool:ubuntu/plucky-devel

Proposed by Mitchell Augustin
Status: Superseded
Proposed branch: ~mitchellaugustin/ubuntu/+source/ipmitool:ubuntu/plucky-devel
Merge into: ubuntu/+source/ipmitool:ubuntu/plucky-devel
Diff against target: 93 lines (+59/-1)
4 files modified
debian/changelog (+7/-0)
debian/control (+2/-1)
debian/patches/selsdr-fix-SEL-cannot-display-sensor-name-when-owner-lun1.patch (+49/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Lena Voytek (community) Needs Fixing
Ubuntu Sponsors Pending
Review via email: mp+484252@code.launchpad.net

This proposal has been superseded by a proposal from 2025-04-30.

Commit message

UBUNTU: SAUCE: sel/sdr : Fix SEL cannot display Sensor name when sensor owner lun1

IPMI specification only allows for a 1 byte sensor number field, in
AMI SP-X firmware owner lun bits(1:0) in the SDR may be used to
extend sensor count beyond 255 sensors

The change will add checking of SEL Generator ID byte 2 LUN bits [1:0]
in the compare with the SDR LUN field to display the correct SDR string
in the SEL event

Signed-off-by: dwise0315 <email address hidden>
Signed-off-by: Mitchell Augustin <email address hidden>

Description of the change

IPMI specification only allows for a 1 byte sensor number field, in
AMI SP-X firmware owner lun bits(1:0) in the SDR may be used to
extend sensor count beyond 255 sensors

The change will add checking of SEL Generator ID byte 2 LUN bits [1:0]
in the compare with the SDR LUN field to display the correct SDR string
in the SEL event

Signed-off-by: dwise0315 <email address hidden>
Signed-off-by: Mitchell Augustin <email address hidden>

To post a comment you must log in.
Revision history for this message
Lena Voytek (lvoytek) wrote :

Thanks for adding this fix! The patch looks good overall, and just needs a few minor changes. I've added some notes in the diff

review: Needs Fixing
Revision history for this message
Mitchell Augustin (mitchellaugustin) wrote :

Thanks Lena, I have updated the MP per your recommendations.

Unmerged commits

7cc35b1... by Mitchell Augustin

UBUNTU: SAUCE: sel/sdr : Fix SEL cannot display Sensor name when sensor owner lun1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index e3b4b01..1935600 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+ipmitool (1.8.19-7.1ubuntu1) plucky; urgency=medium
7+
8+ * d/patches: Apply sauce patch not addressed by upstream
9+ + sel/sdr : Fix SEL cannot display Sensor name (lp: #2076173)
10+
11+ -- Mitchell Augustin <mitchell.augustin@canonical.com> Tue, 15 Apr 2025 15:50:00 -0500
12+
13 ipmitool (1.8.19-7.1) unstable; urgency=medium
14
15 * Non-maintainer upload.
16diff --git a/debian/control b/debian/control
17index 182eba5..61135f1 100644
18--- a/debian/control
19+++ b/debian/control
20@@ -1,7 +1,8 @@
21 Source: ipmitool
22 Section: utils
23 Priority: optional
24-Maintainer: Jörg Frings-Fürst <debian@jff.email>
25+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
26+XSBC-Original-Maintainer: Jörg Frings-Fürst <debian@jff.email>
27 Build-Depends:
28 debhelper-compat (= 13),
29 init-system-helpers (>= 1.58),
30diff --git a/debian/patches/selsdr-fix-SEL-cannot-display-sensor-name-when-owner-lun1.patch b/debian/patches/selsdr-fix-SEL-cannot-display-sensor-name-when-owner-lun1.patch
31new file mode 100644
32index 0000000..9733926
33--- /dev/null
34+++ b/debian/patches/selsdr-fix-SEL-cannot-display-sensor-name-when-owner-lun1.patch
35@@ -0,0 +1,49 @@
36+Description: UBUNTU: SAUCE: sel/sdr : Fix SEL cannot display Sensor name when sensor owner lun1
37+ IPMI specification only allows for a 1 byte sensor number field, in
38+ AMI SP-X firmware owner lun bits(1:0) in the SDR may be used to
39+ extend sensor count beyond 255 sensors
40+
41+ The change will add checking of SEL Generator ID byte 2 LUN bits [1:0]
42+ in the compare with the SDR LUN field to display the correct SDR string
43+ in the SEL event
44+ .
45+Origin: other, https://codeberg.org/IPMITool/ipmitool/pulls/39
46+Bug: https://codeberg.org/IPMITool/ipmitool/issues/8
47+Bug-Ubuntu: https://launchpad.net/bugs/2076173
48+Forwarded: https://codeberg.org/IPMITool/ipmitool/pulls/39
49+Last-Update: 2025-04-10
50+---
51+
52+--- ipmitool-1.8.19.orig/lib/ipmi_sdr.c
53++++ ipmitool-1.8.19/lib/ipmi_sdr.c
54+@@ -3362,12 +3362,14 @@ ipmi_sdr_find_sdr_bynumtype(struct ipmi_
55+ case SDR_RECORD_TYPE_COMPACT_SENSOR:
56+ if (e->record.common->keys.sensor_num == num &&
57+ e->record.common->keys.owner_id == (gen_id & 0x00ff) &&
58++ e->record.common->keys.lun == ((gen_id & 0x0300) >> 8) &&
59+ e->record.common->sensor.type == type)
60+ return e;
61+ break;
62+ case SDR_RECORD_TYPE_EVENTONLY_SENSOR:
63+ if (e->record.eventonly->keys.sensor_num == num &&
64+ e->record.eventonly->keys.owner_id == (gen_id & 0x00ff) &&
65++ e->record.eventonly->keys.lun == ((gen_id & 0x0300) >> 0x8) &&
66+ e->record.eventonly->sensor_type == type)
67+ return e;
68+ break;
69+@@ -3404,6 +3406,7 @@ ipmi_sdr_find_sdr_bynumtype(struct ipmi_
70+ (struct sdr_record_common_sensor *) rec;
71+ if (sdrr->record.common->keys.sensor_num == num
72+ && sdrr->record.common->keys.owner_id == (gen_id & 0x00ff)
73++ && sdrr->record.common->keys.lun == ((gen_id & 0x0300) >> 8)
74+ && sdrr->record.common->sensor.type == type)
75+ found = 1;
76+ break;
77+@@ -3412,6 +3415,7 @@ ipmi_sdr_find_sdr_bynumtype(struct ipmi_
78+ (struct sdr_record_eventonly_sensor *) rec;
79+ if (sdrr->record.eventonly->keys.sensor_num == num
80+ && sdrr->record.eventonly->keys.owner_id == (gen_id & 0x00ff)
81++ && sdrr->record.eventonly->keys.lun == ((gen_id & 0x0300) >> 8)
82+ && sdrr->record.eventonly->sensor_type == type)
83+ found = 1;
84+ break;
85diff --git a/debian/patches/series b/debian/patches/series
86index 98065ad..80cb79e 100644
87--- a/debian/patches/series
88+++ b/debian/patches/series
89@@ -11,3 +11,4 @@
90 0801-fix-lan-print-fails-on-unsupported-parameters.patch
91 0802-fix-temp-read-parameters.patch
92 0803-fix-sdr-hex-value.patch
93+selsdr-fix-SEL-cannot-display-sensor-name-when-owner-lun1.patch

Subscribers

People subscribed via source and target branches