diff options
author | Zdenek Styblik <stybla@turnovfree.net> | 2014-05-25 08:48:50 +0200 |
---|---|---|
committer | Zdenek Styblik <stybla@turnovfree.net> | 2014-05-25 08:48:50 +0200 |
commit | 3f508629a5bb4f807f0e7fb616bc928936d84769 (patch) | |
tree | 1ff9f8b37eee8351a3d8236167934e37c04bb0e4 | |
parent | 347367005102273b425f3629a5a205bfbc8d8c2d (diff) | |
download | ipmitool-3f508629a5bb4f807f0e7fb616bc928936d84769.tar.gz |
ID: 305 - HPM.1 deferred activation support fixup
Currently, the HPM.1 agent in the IPMItool does not differ between Rollback
support and Deferred Activation Support. The patch fixes up this bug.
Commit for Dmitry Bazhenov
-rw-r--r-- | include/ipmitool/ipmi_hpmfwupg.h | 1 | ||||
-rw-r--r-- | lib/ipmi_hpmfwupg.c | 19 |
2 files changed, 13 insertions, 7 deletions
diff --git a/include/ipmitool/ipmi_hpmfwupg.h b/include/ipmitool/ipmi_hpmfwupg.h index 305091e..71ec565 100644 --- a/include/ipmitool/ipmi_hpmfwupg.h +++ b/include/ipmitool/ipmi_hpmfwupg.h @@ -796,6 +796,7 @@ typedef struct _VERSIONINFO { unsigned char imageAux[4]; unsigned char coldResetRequired; unsigned char rollbackSupported; + unsigned char deferredActivationSupported; char descString[HPMFWUPG_DESC_STRING_LENGTH + 1]; }VERSIONINFO, *PVERSIONINFO; diff --git a/lib/ipmi_hpmfwupg.c b/lib/ipmi_hpmfwupg.c index 69950b7..7df0d81 100644 --- a/lib/ipmi_hpmfwupg.c +++ b/lib/ipmi_hpmfwupg.c @@ -344,6 +344,8 @@ HpmfwupgTargetCheck(struct ipmi_intf *intf, int option) generalPropResp.GeneralCompProperties.bitfield.rollbackBackup; gVersionInfo[componentId].coldResetRequired = getCompProp.resp.Response. generalPropResp.GeneralCompProperties.bitfield.payloadColdReset; + gVersionInfo[componentId].deferredActivationSupported = getCompProp.resp.Response. + generalPropResp.GeneralCompProperties.bitfield.deferredActivation; getCompProp.req.selector = HPMFWUPG_COMP_DESCRIPTION_STRING; rc = HpmfwupgGetComponentProperties(intf, &getCompProp); if (rc != HPMFWUPG_SUCCESS) { @@ -395,6 +397,16 @@ HpmfwupgTargetCheck(struct ipmi_intf *intf, int option) gVersionInfo[componentId].rollbackAux[2] = getCompProp.resp.Response.rollbackFwVersionResp.rollbackFwVersion[4]; gVersionInfo[componentId].rollbackAux[3] = getCompProp.resp.Response.rollbackFwVersionResp.rollbackFwVersion[5]; } + mode |= ROLLBACK_VER; + } else { + gVersionInfo[componentId].rollbackMajor = 0xff; + gVersionInfo[componentId].rollbackMinor = 0xff; + gVersionInfo[componentId].rollbackAux[0] = 0xff; + gVersionInfo[componentId].rollbackAux[1] = 0xff; + gVersionInfo[componentId].rollbackAux[2] = 0xff; + gVersionInfo[componentId].rollbackAux[3] = 0xff; + } + if (gVersionInfo[componentId].deferredActivationSupported) { getCompProp.req.selector = HPMFWUPG_COMP_DEFERRED_FIRMWARE_VERSION; rc = HpmfwupgGetComponentProperties(intf, &getCompProp); if (rc != HPMFWUPG_SUCCESS) { @@ -411,14 +423,7 @@ HpmfwupgTargetCheck(struct ipmi_intf *intf, int option) gVersionInfo[componentId].deferredAux[2] = getCompProp.resp.Response.deferredFwVersionResp.deferredFwVersion[4]; gVersionInfo[componentId].deferredAux[3] = getCompProp.resp.Response.deferredFwVersionResp.deferredFwVersion[5]; } - mode |= ROLLBACK_VER; } else { - gVersionInfo[componentId].rollbackMajor = 0xff; - gVersionInfo[componentId].rollbackMinor = 0xff; - gVersionInfo[componentId].rollbackAux[0] = 0xff; - gVersionInfo[componentId].rollbackAux[1] = 0xff; - gVersionInfo[componentId].rollbackAux[2] = 0xff; - gVersionInfo[componentId].rollbackAux[3] = 0xff; gVersionInfo[componentId].deferredMajor = 0xff; gVersionInfo[componentId].deferredMinor = 0xff; gVersionInfo[componentId].deferredAux[0] = 0xff; |