summaryrefslogtreecommitdiff
path: root/psu-manager/src/cold_redundancy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'psu-manager/src/cold_redundancy.cpp')
-rw-r--r--psu-manager/src/cold_redundancy.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/psu-manager/src/cold_redundancy.cpp b/psu-manager/src/cold_redundancy.cpp
index 8998771..d6bd241 100644
--- a/psu-manager/src/cold_redundancy.cpp
+++ b/psu-manager/src/cold_redundancy.cpp
@@ -44,6 +44,7 @@ static const constexpr char* rootPath = "/xyz/openbmc_project/CallbackManager";
static std::vector<std::unique_ptr<PowerSupply>> powerSupplies;
static std::vector<uint64_t> addrTable = {0x50, 0x51};
+static uint8_t psuRescanBus = 7;
static int pingFd = -1;
ColdRedundancy::ColdRedundancy(
@@ -338,11 +339,12 @@ int pingPSU(const uint8_t& addr)
}
void rescanPSUEntityManager(
- std::shared_ptr<sdbusplus::asio::connection>& dbusConnection)
+ uint8_t bus, std::shared_ptr<sdbusplus::asio::connection>& dbusConnection)
{
sdbusplus::message::message method = dbusConnection->new_method_call(
"xyz.openbmc_project.FruDevice", "/xyz/openbmc_project/FruDevice",
- "xyz.openbmc_project.FruDeviceManager", "ReScan");
+ "xyz.openbmc_project.FruDeviceManager", "ReScanBus");
+ method.append(bus);
try
{
@@ -392,7 +394,7 @@ void keepAlive(std::shared_ptr<sdbusplus::asio::connection>& dbusConnection)
}
if (newPSUFound)
{
- rescanPSUEntityManager(dbusConnection);
+ rescanPSUEntityManager(psuRescanBus, dbusConnection);
}
}
@@ -503,6 +505,7 @@ void ColdRedundancy::createPSU(
"entry in configuration\n";
return;
}
+ psuRescanBus = *psuBus;
addrTable = *psuAddress;
if (setPingFd(pingFd, *psuBus))
{