Currently all relevant SDR cmds seems to be fully supported, some
are processed even when corresponding bit is not set (e.g. the
IPMI_SDR_DELETE_SDR_SUPPORTED cmd) in the Operation Support field.

With that in mind it feels reasonable to expect from the main
SDR to have all the Operation Support bits set (including the
update operations (modal, non-modal)).

The added benefit is that ipmitool can now process the add/delete
timestamps and print them out (instead of just considering them
as "NA").

Signed-off-by: Michal Berger <[email protected]>
---
 lanserv/bmc.c | 2 +-
 lanserv/bmc.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lanserv/bmc.c b/lanserv/bmc.c
index e72901ba..2eea26dd 100644
--- a/lanserv/bmc.c
+++ b/lanserv/bmc.c
@@ -1215,7 +1215,7 @@ ipmi_emu_add_mc(emu_data_t    *emu,
     mc->sel.time_offset = 0;
     mc->main_sdrs.time_offset = 0;
     mc->main_sdrs.next_entry = 1;
-    mc->main_sdrs.flags |= IPMI_SDR_RESERVE_SDR_SUPPORTED;
+    mc->main_sdrs.flags |= IPMI_SDR_ALL_OPERATIONS_SUPPORTED;
     for (i=0; i<4; i++) {
        mc->device_sdrs[i].time_offset = 0;
        mc->device_sdrs[i].next_entry = 1;
diff --git a/lanserv/bmc.h b/lanserv/bmc.h
index fdaf8e51..1881af31 100644
--- a/lanserv/bmc.h
+++ b/lanserv/bmc.h
@@ -388,6 +388,8 @@ void iterate_sdrs(lmc_data_t *mc,
 #define IPMI_SDR_PARTIAL_ADD_SDR_SUPPORTED             (1 << 2)
 #define IPMI_SDR_RESERVE_SDR_SUPPORTED                 (1 << 1)
 #define IPMI_SDR_GET_SDR_ALLOC_INFO_SDR_SUPPORTED      (1 << 0)
+/* Includes update support bits (modal, non-modal) */
+#define IPMI_SDR_ALL_OPERATIONS_SUPPORTED              0x6f
 
 void picmg_led_set(lmc_data_t *mc, sensor_t *sensor);
 void set_sensor_bit(lmc_data_t *mc, sensor_t *sensor, unsigned char bit,
-- 
2.43.0



_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to