diff --git a/pyghmi/ipmi/oem/lenovo/config.py b/pyghmi/ipmi/oem/lenovo/config.py index 826700d1..f51eae45 100644 --- a/pyghmi/ipmi/oem/lenovo/config.py +++ b/pyghmi/ipmi/oem/lenovo/config.py @@ -548,5 +548,9 @@ class LenovoFirmwareConfig(object): filehandle = self.imm_open("asu_update.efi", write=True, size=len(data)) self.imm_write(filehandle, len(data), data) + stubread = len(data) + if stubread > 8: + stubread = 8 + self.imm_read(filehandle, stubread) self.imm_close(filehandle) return True diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index b7d8a439..1071dfcb 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -254,23 +254,12 @@ class IMMClient(object): raise pygexc.InvalidParameterValue( '{0} not a known setting'.format(key)) self.merge_changeset(changeset) - changepending = True if changeset: try: - changepending = self.fwc.set_fw_options(self.fwo) - except Exception: + self.fwc.set_fw_options(self.fwo) + finally: self.fwo = None self.fwovintage = 0 - raise - giveup = util._monotonic_time() + 60 - while changeset and changepending: - ipmisession.Session.pause(1) - self.fwo = self.fwc.get_fw_options(fetchimm=fetchimm) - self.fwovintage = util._monotonic_time() - if self.fwovintage > giveup: - break - self.merge_changeset(changeset) - changepending = self.fwc.set_fw_options(self.fwo, checkonly=True) def merge_changeset(self, changeset): for key in changeset: