diff options
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0002-Fix-PECI-client-creation-flow.patch')
-rw-r--r-- | meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0002-Fix-PECI-client-creation-flow.patch | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0002-Fix-PECI-client-creation-flow.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0002-Fix-PECI-client-creation-flow.patch index cfdc99d66..7c4dbfc19 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0002-Fix-PECI-client-creation-flow.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors/0002-Fix-PECI-client-creation-flow.patch @@ -1,4 +1,4 @@ -From 0a1b2a13f6dbc64b5851ac2b1ca99d57afa78d60 Mon Sep 17 00:00:00 2001 +From 23ccb3de03ad9b49f2441aa0f7a0cfb20ea8ee78 Mon Sep 17 00:00:00 2001 From: Jae Hyun Yoo <jae.hyun.yoo@intel.com> Date: Wed, 27 Jan 2021 15:52:16 -0800 Subject: [PATCH] Fix PECI client creation flow @@ -12,10 +12,10 @@ Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com> 1 file changed, 54 insertions(+), 12 deletions(-) diff --git a/src/CPUSensorMain.cpp b/src/CPUSensorMain.cpp -index f304e3f..92c1716 100644 +index a352735..abae170 100644 --- a/src/CPUSensorMain.cpp +++ b/src/CPUSensorMain.cpp -@@ -82,6 +82,7 @@ struct CPUConfig +@@ -83,6 +83,7 @@ struct CPUConfig }; static constexpr const char* peciDev = "/dev/peci-"; @@ -23,7 +23,7 @@ index f304e3f..92c1716 100644 static constexpr const unsigned int rankNumMax = 8; namespace fs = std::filesystem; -@@ -167,7 +168,7 @@ bool createSensors(boost::asio::io_service& io, +@@ -168,7 +169,7 @@ bool createSensors(boost::asio::io_service& io, } std::vector<fs::path> hwmonNamePaths; @@ -32,7 +32,7 @@ index f304e3f..92c1716 100644 R"(peci-\d+/\d+-.+/peci-.+/hwmon/hwmon\d+/name$)", hwmonNamePaths, 6)) { -@@ -403,7 +404,7 @@ bool createSensors(boost::asio::io_service& io, +@@ -404,7 +405,7 @@ bool createSensors(boost::asio::io_service& io, return true; } @@ -41,7 +41,7 @@ index f304e3f..92c1716 100644 { std::ostringstream hex; hex << std::hex << config.addr; -@@ -411,9 +412,12 @@ void exportDevice(const CPUConfig& config) +@@ -412,9 +413,12 @@ void exportDevice(const CPUConfig& config) std::string busStr = std::to_string(config.bus); std::string parameters = "peci-client 0x" + addrHexStr; @@ -56,7 +56,7 @@ index f304e3f..92c1716 100644 const std::string& dir = devicePath.parent_path().string(); for (const auto& path : std::filesystem::directory_iterator(dir)) { -@@ -431,20 +435,38 @@ void exportDevice(const CPUConfig& config) +@@ -432,20 +436,38 @@ void exportDevice(const CPUConfig& config) std::cout << parameters << " on bus " << busStr << " is already exported\n"; } @@ -99,7 +99,7 @@ index f304e3f..92c1716 100644 } void detectCpu(boost::asio::deadline_timer& pingTimer, -@@ -460,6 +482,11 @@ void detectCpu(boost::asio::deadline_timer& pingTimer, +@@ -461,6 +483,11 @@ void detectCpu(boost::asio::deadline_timer& pingTimer, for (CPUConfig& config : cpuConfigs) { @@ -111,7 +111,7 @@ index f304e3f..92c1716 100644 std::string peciDevPath = peciDev + std::to_string(config.bus); auto file = open(peciDevPath.c_str(), O_RDWR | O_CLOEXEC); if (file < 0) -@@ -510,16 +537,29 @@ void detectCpu(boost::asio::deadline_timer& pingTimer, +@@ -511,16 +538,29 @@ void detectCpu(boost::asio::deadline_timer& pingTimer, newState = State::OFF; } @@ -145,7 +145,7 @@ index f304e3f..92c1716 100644 } if (newState == State::ON) -@@ -542,6 +582,8 @@ void detectCpu(boost::asio::deadline_timer& pingTimer, +@@ -543,6 +583,8 @@ void detectCpu(boost::asio::deadline_timer& pingTimer, keepPinging = true; } |