Files
OpenBMC/meta-luxshare/meta-bhs/recipes-phosphor/ipmi/phosphor-ipmi-host/0002-ClearSel-Disable-check-SEL-Reservation.patch
2026-04-23 17:07:55 +08:00

59 lines
2.0 KiB
Diff
Executable File

From bfcde1e1685eeb7ca78c71bc399f39cbbf9e2ecc Mon Sep 17 00:00:00 2001
From: "Wang.Bin" <Bin-B.Wang@luxshare-ict.com>
Date: Fri, 20 Dec 2024 16:19:42 +0800
Subject: [PATCH 2/2] ClearSel Disable check SEL Reservation
---
storagehandler.cpp | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/storagehandler.cpp b/storagehandler.cpp
index 67d76ea..389a805 100644
--- a/storagehandler.cpp
+++ b/storagehandler.cpp
@@ -516,7 +516,7 @@ ipmi::RspType<uint16_t // deleted record ID
ipmi::RspType<uint8_t // erase status
>
- clearSEL(uint16_t reservationID, const std::array<char, 3>& clr,
+ clearSEL(uint16_t /*reservationID*/, const std::array<char, 3>& clr,
uint8_t eraseOperation)
{
static constexpr std::array<char, 3> clrOk = {'C', 'L', 'R'};
@@ -525,10 +525,10 @@ ipmi::RspType<uint8_t // erase status
return ipmi::responseInvalidFieldRequest();
}
- if (!checkSELReservation(reservationID))
- {
- return ipmi::responseInvalidReservationId();
- }
+ // if (!checkSELReservation(reservationID))
+ // {
+ // return ipmi::responseInvalidReservationId();
+ // }
/*
* Erasure status cannot be fetched from DBUS, so always return erasure
@@ -794,6 +794,8 @@ ipmi::RspType<uint16_t // recordID of the Added SEL entry
// a maintenance procedure associated with eSEL record.
static constexpr auto procedureType = 0xDE;
cancelSELReservation();
+ std::cout << "sensorNumber:" << static_cast<int>(sensorNumber) <<"sensorType:"
+ << static_cast<int>(sensorType) << std::endl;
if (recordType == systemRecordType)
{
for (const auto& it : invSensors)
@@ -805,7 +807,7 @@ ipmi::RspType<uint16_t // recordID of the Added SEL entry
}
}
auto selDataStr = ipmi::sel::toHexStr(eventData);
-
+ std::cout << "eventData:" << selDataStr << std::endl;
bool assert = (eventDir & 0x80) ? false : true;
recordID = report<SELCreated>(Created::RECORD_TYPE(recordType),
--
2.25.1