summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Wilson <wilsonan@us.ibm.com>2019-03-26 17:05:50 -0500
committerAnthony Wilson <wilsonan@us.ibm.com>2019-04-01 14:21:45 -0500
commitaa2030c2fb261ec9c3e43a04afdf8b7602d20258 (patch)
tree615edf5f5f7e6998b4ae68bd52effeb316881376
parent3348e62e2af12fa6bd191292dff4a4195628579b (diff)
downloadopenpower-proc-control-aa2030c2fb261ec9c3e43a04afdf8b7602d20258.zip
openpower-proc-control-aa2030c2fb261ec9c3e43a04afdf8b7602d20258.tar.gz
cleanupPCIE: Catch file_error::Open exception
The bus that is read may only show up at certain times, such as during poweron. It is not a fatal error condition if the bus is not available. So we will let it get logged to the journal, but not let it get committed in this case. Tested: It was an intermittent failure, but ran poweron/poweroff a few times and didn't see the error pop up again. Resolves: openbmc/openbmc#3510 Change-Id: I47629e5f27fb847aa0094f0757b1988f8e645ebc Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
-rw-r--r--procedures/p9/cleanup_pcie.cpp35
1 files changed, 22 insertions, 13 deletions
diff --git a/procedures/p9/cleanup_pcie.cpp b/procedures/p9/cleanup_pcie.cpp
index 8d1145a..68b6649 100644
--- a/procedures/p9/cleanup_pcie.cpp
+++ b/procedures/p9/cleanup_pcie.cpp
@@ -19,6 +19,7 @@
#include "targeting.hpp"
#include <phosphor-logging/log.hpp>
+#include <xyz/openbmc_project/Common/File/error.hpp>
namespace openpower
{
@@ -29,6 +30,7 @@ using namespace phosphor::logging;
using namespace openpower::cfam::access;
using namespace openpower::cfam::p9;
using namespace openpower::targeting;
+namespace file_error = sdbusplus::xyz::openbmc_project::Common::File::Error;
/**
* @brief Disables PCIE drivers and receiver in the PCIE root ctrl 1 register
@@ -36,24 +38,31 @@ using namespace openpower::targeting;
*/
void cleanupPcie()
{
- Targeting targets;
+ try
+ {
+ Targeting targets;
- log<level::INFO>("Running P9 procedure cleanupPcie");
+ log<level::INFO>("Running P9 procedure cleanupPcie");
- // Disable the PCIE drivers and receiver on all CPUs
- for (const auto& target : targets)
- {
- try
- {
- writeReg(target, P9_ROOT_CTRL1_CLEAR, 0x00001C00);
- }
- catch (std::exception& e)
+ // Disable the PCIE drivers and receiver on all CPUs
+ for (const auto& target : targets)
{
- // Don't need an error log coming from the power off
- // path, just keep trying on the other processors.
- continue;
+ try
+ {
+ writeReg(target, P9_ROOT_CTRL1_CLEAR, 0x00001C00);
+ }
+ catch (std::exception& e)
+ {
+ // Don't need an error log coming from the power off
+ // path, just keep trying on the other processors.
+ continue;
+ }
}
}
+ catch (file_error::Open& e)
+ {
+ // For this procedure we can ignore the ::Open error
+ }
}
REGISTER_PROCEDURE("cleanupPcie", cleanupPcie);
OpenPOWER on IntegriCloud