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

Update scan failed

At least one of the branches involved have failed to scan. You can manually schedule a rescan if required.

Preview Diff

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

Subscribers

People subscribed via source and target branches