Fix HPM.1 upgrade to apply to only given component when instructed to do so.

Patch submitted by Harshad Prabhu (Harshad.Prabhu at radisys dot com).
Quoting his email:

"Initiate Upgrade Action (HPMFWUPG_UPGRADE_ACTION_UPGRADE) was called
for all components even when single component was given on command line
(hpm upgrade <filename> component <id>). So calling this command only
after we decide whether the component is skipped."
This commit is contained in:
Dmitry Frolov 2007-08-29 06:03:23 +00:00
parent 56adf15b23
commit 8954fe454b
2 changed files with 13 additions and 10 deletions

View File

@ -6,6 +6,8 @@ version 1.8.10
* Fix bug in "chassis poh" command.
* Added configure option to disable dual bridge support in open
interface to help compiling on FreeBSD
* Fix HPM.1 upgrade to apply to only given component when instructed
to do so
version 1.8.9 released 2007-03-06
* Added initial AMC ekey query operation support

View File

@ -1816,16 +1816,6 @@ int HpmfwupgUpgradeStage(struct ipmi_intf *intf, struct HpmfwupgUpgradeCtx* pFwu
unsigned char componentIdByte = 0x00;
/* Send initiate command */
initUpgActionCmd.req.componentsMask = pActionRecord->components;
/* Action is upgrade */
initUpgActionCmd.req.upgradeAction = HPMFWUPG_UPGRADE_ACTION_UPGRADE;
rc = HpmfwupgInitiateUpgradeAction(intf, &initUpgActionCmd, pFwupgCtx);
if (rc != HPMFWUPG_SUCCESS)
{
break;
}
/* Save component ID on which the upload is done */
componentIdByte = pActionRecord->components.ComponentBits.byte;
while ((componentIdByte>>=1)!=0)
@ -1897,6 +1887,17 @@ int HpmfwupgUpgradeStage(struct ipmi_intf *intf, struct HpmfwupgUpgradeCtx* pFwu
pImagePtr = pDataInitial + firmwareLength;
break;
}
/* Send initiate command */
initUpgActionCmd.req.componentsMask = pActionRecord->components;
/* Action is upgrade */
initUpgActionCmd.req.upgradeAction = HPMFWUPG_UPGRADE_ACTION_UPGRADE;
rc = HpmfwupgInitiateUpgradeAction(intf, &initUpgActionCmd, pFwupgCtx);
if (rc != HPMFWUPG_SUCCESS)
{
break;
}
pVersionInfo = (VERSIONINFO*) &gVersionInfo[componentId];