From 3cb28aaff0be3fd32e6aa8b31b33d6097f67fd97 Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Mon, 19 Jul 2021 02:29:55 +0000 Subject: [PATCH] Revert "Unifying the platform api for get_pcie_aer_stats with PcieBase (#197)" This reverts commit 238d76b2f27bb0a1413e08779035906b953a0ac3. --- sonic_platform_base/sonic_pcie/pcie_common.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sonic_platform_base/sonic_pcie/pcie_common.py b/sonic_platform_base/sonic_pcie/pcie_common.py index 58590ea8c..d448a6533 100644 --- a/sonic_platform_base/sonic_pcie/pcie_common.py +++ b/sonic_platform_base/sonic_pcie/pcie_common.py @@ -27,7 +27,7 @@ def load_config_file(self): config_file = "{}/pcie{}.yaml".format(self.config_path, conf_rev) try: with open(config_file) as conf_file: - self.confInfo = yaml.safe_load(conf_file) + self.confInfo = yaml.load(conf_file) except IOError as e: print("Error: {}".format(str(e))) print("Not found config file, please add a config file manually, or generate it by running [pcieutil pcie_generate]") @@ -101,9 +101,9 @@ def get_pcie_check(self): return self.confInfo # return AER stats of PCIe device - def get_pcie_aer_stats(self, domain=0, bus=0, dev=0, func=0): + def get_pcie_aer_stats(self, domain=0, bus=0, device=0, func=0): aer_stats = {'correctable': {}, 'fatal': {}, 'non_fatal': {}} - dev_path = os.path.join('/sys/bus/pci/devices', '%04x:%02x:%02x.%d' % (domain, bus, dev, func)) + dev_path = os.path.join('/sys/bus/pci/devices', '%04x:%02x:%02x.%d' % (domain, bus, device, func)) # construct AER sysfs filepath correctable_path = os.path.join(dev_path, "aer_dev_correctable")