summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net/0012-Do-not-stop-session-in-deactivate-payload.patch
blob: 6430a69281bcd421911f6cbc3e9968962273735f (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From cf8c0e1bf18334fe4a8f76c1e9b34ccfdc82f6f9 Mon Sep 17 00:00:00 2001
From: Yong Li <yong.b.li@linux.intel.com>
Date: Fri, 15 Nov 2019 18:34:04 +0800
Subject: [PATCH] Do not stop session in deactivate payload

IPMI spec defines that:
The Deactivate Payload command does not cause the session to be terminated;

Also during SOL looptest, there is only one time startSession call,
but multiple stopSessions calls,
This causes the looptest will fail if there is any new sessions comes in,
needs to remove the stopSession call.

Tested:
Start the loop test in a terminal:
ipmitool -H $BMCIP  -Uroot -P 0penBmc -I lanplus sol looptest 500 200

Then start a new session in another terminal:
ipmitool -H $BMCIP  -Uroot -P 0penBmc -I lanplus raw 6 1

The looptest still works

Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
---
 command/payload_cmds.cpp | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/command/payload_cmds.cpp b/command/payload_cmds.cpp
index f558781..363b843 100644
--- a/command/payload_cmds.cpp
+++ b/command/payload_cmds.cpp
@@ -176,13 +176,6 @@ std::vector<uint8_t> deactivatePayload(const std::vector<uint8_t>& inPayload,
              */
             return outPayload;
         }
-
-        auto check =
-            std::get<session::Manager&>(singletonPool).stopSession(sessionID);
-        if (!check)
-        {
-            response->completionCode = IPMI_CC_UNSPECIFIED_ERROR;
-        }
     }
     catch (std::exception& e)
     {
-- 
2.7.4