summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0057-Add-timer-use-actions-support.patch
blob: f091b31fa4a6a6333e23acb96692b4ce74d2625f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 3c69c94eed1a0c6eecfd53e739fade6596c6f3e5 Mon Sep 17 00:00:00 2001
From: Yong Li <yong.b.li@linux.intel.com>
Date: Thu, 12 Sep 2019 17:37:05 +0800
Subject: [PATCH] Add timer use/actions support

Based on IPMI spec, add timer use/actions support,
and add input data checking

Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
---
 app/watchdog.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/watchdog.cpp b/app/watchdog.cpp
index c4e594d..18e7e3a 100644
--- a/app/watchdog.cpp
+++ b/app/watchdog.cpp
@@ -251,8 +251,8 @@ ipmi::RspType<> ipmiSetWatchdogTimer(
         return ipmi::responseInvalidFieldRequest();
     }
 
-    timerLogFlags = static_cast<uint8_t>(dontLog);
-    timerActions &= static_cast<uint8_t>(timeoutAction) |
+    timerLogFlags = (static_cast<uint8_t>(dontLog)) << 7;
+    timerActions = static_cast<uint8_t>(timeoutAction) |
                     static_cast<uint8_t>(preTimeoutInterrupt) << 4;
 
     try
-- 
2.7.4