2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-02 15:36:05 +00:00

Keep the device available bit out of the firmware version

The top bit of the major revision byte of Get Device ID says the device is
still initialising or taking a firmware update.  It was read as part of
the revision, so immediately after a bmc reset nodefirmware reported "BMC
Version: 131.11" for what is 3.11, and settled down only once the bit
cleared.

Mask it as sdr.py already does for the same byte, so the two agree about
the same field.
This commit is contained in:
Markus Hilger
2026-08-14 02:57:55 +02:00
parent 593dc75145
commit 63c5f2dca5
+4 -1
View File
@@ -2233,7 +2233,10 @@ class Command(object):
await self.oem_init()
mcinfo = await self.raw_command(netfn=6, command=1)
major, minor = struct.unpack('BB', mcinfo['data'][2:4])
bmcver = '{0}.{1}'.format(major, hex(minor)[2:])
# The top bit of the major byte says the device is still initialising
# or taking an update, and is not part of the revision, so mask it off
# the way sdr.py does rather than reporting 131.11 for 3.11
bmcver = '{0}.{1}'.format(major & 0b1111111, hex(minor)[2:])
async for x in self._oem.get_oem_firmware(bmcver, components, category):
yield x