From 73d81f2a8cb86cae5b0fb262b45b9dde114e1778 Mon Sep 17 00:00:00 2001 From: luyf5 Date: Mon, 13 Sep 2021 10:20:50 +0800 Subject: [PATCH] workaround for kent fw defect 45862 Changes are from https://gitlab.icelab.lenovo.com/pygcon/pyghmi/commit/dcb59ab876fff9177449b92e1d7e823840572c5d fix the bug 45862 and bug 46082 Change-Id: I333f7d47831a124c13153f90de9627602b7cf84e --- pyghmi/ipmi/oem/lenovo/cpu.py | 3 ++- pyghmi/ipmi/oem/lenovo/dimm.py | 2 +- pyghmi/ipmi/oem/lenovo/pci.py | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pyghmi/ipmi/oem/lenovo/cpu.py b/pyghmi/ipmi/oem/lenovo/cpu.py index 502a88fc..d8fcd88c 100755 --- a/pyghmi/ipmi/oem/lenovo/cpu.py +++ b/pyghmi/ipmi/oem/lenovo/cpu.py @@ -47,6 +47,7 @@ def get_categories(): "cpu": { "idstr": "CPU {0}", "parser": parse_cpu_info, - "command": cpu_cmd + "command": cpu_cmd, + "workaround_bmc_bug": lambda t: t == "ami" } } diff --git a/pyghmi/ipmi/oem/lenovo/dimm.py b/pyghmi/ipmi/oem/lenovo/dimm.py index d3cd7709..0c02062c 100755 --- a/pyghmi/ipmi/oem/lenovo/dimm.py +++ b/pyghmi/ipmi/oem/lenovo/dimm.py @@ -54,6 +54,6 @@ def get_categories(): "idstr": "DIMM {0}", "parser": parse_dimm_info, "command": dimm_cmd, - "workaround_bmc_bug": True + "workaround_bmc_bug": lambda t: True } } diff --git a/pyghmi/ipmi/oem/lenovo/pci.py b/pyghmi/ipmi/oem/lenovo/pci.py index 18ecfc83..88e9d95f 100755 --- a/pyghmi/ipmi/oem/lenovo/pci.py +++ b/pyghmi/ipmi/oem/lenovo/pci.py @@ -56,6 +56,7 @@ def get_categories(): "netfn": 0x06, "command": 0x59, "data": (0x00, 0xc1, 0x03, 0x00) - } + }, + "workaround_bmc_bug": lambda t: t == "ami" } }