entity-manager: Increasing the bus read timeout for FRU
The FRU for NVME M2 SSD went missing after chassis power cycle.
By increasing the I2C bus read timeout, allowing the service more time
to read the FRU for the device. Worst case measurement during 10 DC
Cycles is 6 seconds.
Upstream: <upstream 7329a22510f77ec49de3aebdcd975044d30e862a>
ref: https://gerrit.openbmc.org/c/openbmc/entity-manager/+/64716
Tested:
Set two machines to do dc cycle
machine 1 pass 119 power cycles
machine 2 pass 120 power cycles
Google-Bug-Id: 296187577
Change-Id: I44fd18b2ea8a469aa1d2d77e25951c83a4746690
Signed-off-by: Duke Du <duke.du@quanta.corp-partner.google.com>
diff --git a/recipes-phosphor/configuration/entity-manager/0001-Increasing-the-bus-read-timeout-for-FRU.patch b/recipes-phosphor/configuration/entity-manager/0001-Increasing-the-bus-read-timeout-for-FRU.patch
new file mode 100644
index 0000000..11b2f38
--- /dev/null
+++ b/recipes-phosphor/configuration/entity-manager/0001-Increasing-the-bus-read-timeout-for-FRU.patch
@@ -0,0 +1,39 @@
+From 535462930aa4c8dca5ad72fddb1530cc9d86b822 Mon Sep 17 00:00:00 2001
+From: ankita prasad <ankita.prasad@intel.com>
+Date: Fri, 7 Jul 2023 09:18:10 +0000
+Subject: [PATCH] Increasing the bus read timeout for FRU
+
+The FRU for NVME M2 SSD went missing after chassis power cycle.
+By increasing the I2C bus read timeout, allowing the service more time
+to read the FRU for the device. Worst case measurement during 10 DC Cycles is 6 seconds.
+
+Upstream: <upstream 7329a22510f77ec49de3aebdcd975044d30e862a>
+https://gerrit.openbmc.org/c/openbmc/entity-manager/+/64716
+
+Tested: Tested, the device does not disappear after the power cycle
+1. ipmitool chassis power cycle
+2. ipmitool fru list
+3. The device appears once the chassis power is up
+
+Change-Id: I11ba84bbd133184406548be9581bb22a4bbebe9c
+Signed-off-by: Ankita Prasad <ankita.prasad@intel.com>
+---
+ src/fru_device.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/fru_device.cpp b/src/fru_device.cpp
+index 5ef7783..db818e1 100644
+--- a/src/fru_device.cpp
++++ b/src/fru_device.cpp
+@@ -62,7 +62,7 @@ namespace fs = std::filesystem;
+ static constexpr bool debug = false;
+ constexpr size_t maxFruSize = 512;
+ constexpr size_t maxEepromPageIndex = 255;
+-constexpr size_t busTimeoutSeconds = 5;
++constexpr size_t busTimeoutSeconds = 10;
+
+ constexpr const char* blacklistPath = PACKAGE_DIR "blacklist.json";
+
+--
+2.34.1
+
diff --git a/recipes-phosphor/configuration/entity-manager_%.bbappend b/recipes-phosphor/configuration/entity-manager_%.bbappend
index bbe0ef2..7a2b806 100644
--- a/recipes-phosphor/configuration/entity-manager_%.bbappend
+++ b/recipes-phosphor/configuration/entity-manager_%.bbappend
@@ -7,6 +7,7 @@
file://0005-entity-manager-Avoid-direct-substitution.patch \
file://0006-entity-manager-Allow-substituting-variables-more-tha.patch \
file://0001-Add-USB-Device-discovery-daemon.patch \
+ file://0001-Increasing-the-bus-read-timeout-for-FRU.patch \
"
SYSTEMD_AUTO_ENABLE:usb-device = "enable"
SYSTEMD_SERVICE:usb-device = "xyz.openbmc_project.UsbDevice.service"