From e2e698de2115451c4c4d8ee80c5c9fa445435c4c Mon Sep 17 00:00:00 2001 From: Ashwin Srinivasan Date: Mon, 20 Mar 2023 18:06:14 +0000 Subject: [PATCH] Added relevant comments per prgeor review comments --- sonic-pcied/scripts/pcied | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sonic-pcied/scripts/pcied b/sonic-pcied/scripts/pcied index c24df5460..b07ca1a87 100644 --- a/sonic-pcied/scripts/pcied +++ b/sonic-pcied/scripts/pcied @@ -160,6 +160,12 @@ class DaemonPcied(daemon_base.DaemonBase): if self.resultInfo is None: return + # This block reads the PCIE YAML file, iterates through each device and + # for each device runs a transaction check to verify that the device ID + # matches the one on file. In the event of an invalid device ID such as + # '0xffff', it marks the device as missing as that is the only scenario + # in which such a value is returned. + try: stream = open(PLATFORM_PCIE_YAML_FILE, 'r') @@ -191,7 +197,7 @@ class DaemonPcied(daemon_base.DaemonBase): else: self.log_error("PCIe device {:02x}:{:02x}.{:01d} ID mismatch. Expected {}, received {}".format(bus, device, func, pcieDeviceID, pcieDeviceQueryResult)) except Exception as ex: - self.log_error("PCIe Exception occurred: {}".format(ex)) + self.log_error("PCIe Exception occurred for PCIe device {:02x}:{:02x}.{:01d}: {}".format(bus, device, func, ex)) pass for result in self.resultInfo: