mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
Improvement to hpm upgrade during activation. This resolves issue where activation seems to have failed because ipmitool received an unsupported completion code.
This commit is contained in:
parent
7fc4ce6eae
commit
c5c6315525
@ -3262,8 +3262,7 @@ int HpmfwupgQueryRollbackStatus(struct ipmi_intf *intf, struct HpmfwupgQueryRoll
|
|||||||
timeoutSec2 = time(NULL);
|
timeoutSec2 = time(NULL);
|
||||||
|
|
||||||
}while( rsp &&
|
}while( rsp &&
|
||||||
((rsp->ccode == HPMFWUPG_COMMAND_IN_PROGRESS) ||
|
(rsp->ccode == HPMFWUPG_COMMAND_IN_PROGRESS) &&
|
||||||
(rsp->ccode == IPMI_CC_TIMEOUT)) &&
|
|
||||||
(timeoutSec2 - timeoutSec1 < rollbackTimeout ) );
|
(timeoutSec2 - timeoutSec1 < rollbackTimeout ) );
|
||||||
|
|
||||||
if ( rsp )
|
if ( rsp )
|
||||||
@ -3599,7 +3598,7 @@ int HpmfwupgWaitLongDurationCmd(struct ipmi_intf *intf, struct HpmfwupgUpgradeCt
|
|||||||
*/
|
*/
|
||||||
if ( pFwupgCtx != NULL )
|
if ( pFwupgCtx != NULL )
|
||||||
{
|
{
|
||||||
upgradeTimeout = pFwupgCtx->targetCap.upgradeTimeout*5;
|
upgradeTimeout = (unsigned int)(pFwupgCtx->targetCap.upgradeTimeout*5);
|
||||||
if ( verbose )
|
if ( verbose )
|
||||||
printf("Use File Upgrade Capabilities: %i seconds\n", upgradeTimeout);
|
printf("Use File Upgrade Capabilities: %i seconds\n", upgradeTimeout);
|
||||||
}
|
}
|
||||||
@ -3617,7 +3616,7 @@ int HpmfwupgWaitLongDurationCmd(struct ipmi_intf *intf, struct HpmfwupgUpgradeCt
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
upgradeTimeout = (targetCapCmd.resp.upgradeTimeout * 5);
|
upgradeTimeout = (unsigned int)(targetCapCmd.resp.upgradeTimeout * 5);
|
||||||
if ( verbose )
|
if ( verbose )
|
||||||
printf("Use Command Upgrade Capabilities Timeout: %i seconds\n", upgradeTimeout);
|
printf("Use Command Upgrade Capabilities Timeout: %i seconds\n", upgradeTimeout);
|
||||||
}
|
}
|
||||||
@ -3632,15 +3631,17 @@ int HpmfwupgWaitLongDurationCmd(struct ipmi_intf *intf, struct HpmfwupgUpgradeCt
|
|||||||
}
|
}
|
||||||
|
|
||||||
while(
|
while(
|
||||||
(upgStatusCmd.resp.lastCmdCompCode == HPMFWUPG_COMMAND_IN_PROGRESS ) &&
|
//With KCS: Cover the case where we sometime receive d5 (on the first get status) from the ipmi driver.
|
||||||
(timeoutSec2 - timeoutSec1 < upgradeTimeout ) &&
|
(upgStatusCmd.resp.lastCmdCompCode != 0x00 ) &&
|
||||||
(rc == HPMFWUPG_SUCCESS)
|
((timeoutSec2 - timeoutSec1) < upgradeTimeout ) &&
|
||||||
|
(rc == HPMFWUPG_SUCCESS)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
/* Must wait at least 1000 ms between status requests */
|
/* Must wait at least 1000 ms between status requests */
|
||||||
usleep(1000000);
|
usleep(1000000);
|
||||||
|
timeoutSec2 = time(NULL);
|
||||||
rc = HpmfwupgGetUpgradeStatus(intf, &upgStatusCmd, pFwupgCtx);
|
rc = HpmfwupgGetUpgradeStatus(intf, &upgStatusCmd, pFwupgCtx);
|
||||||
//printf("Get Status: %x - %x = %x _ %x [%x]\n", timeoutSec2, timeoutSec1,(timeoutSec2 - timeoutSec1),upgradeTimeout, rc);
|
//printf("Get Status: %x - %x = %x _ %x [%x]\n", timeoutSec2, timeoutSec1,(timeoutSec2 - timeoutSec1),upgradeTimeout, rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( upgStatusCmd.resp.lastCmdCompCode != 0x00 )
|
if ( upgStatusCmd.resp.lastCmdCompCode != 0x00 )
|
||||||
|
@ -196,7 +196,7 @@ int ipmi_kontronoem_set_large_buffer(struct ipmi_intf * intf, unsigned char size
|
|||||||
{
|
{
|
||||||
if(ipmi_kontronoem_send_set_large_buffer( intf, 0x0e, size ) == 0)
|
if(ipmi_kontronoem_send_set_large_buffer( intf, 0x0e, size ) == 0)
|
||||||
{
|
{
|
||||||
printf("Set remote big buffer\r\n");
|
//printf("Set remote big buffer\r\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -205,7 +205,7 @@ int ipmi_kontronoem_set_large_buffer(struct ipmi_intf * intf, unsigned char size
|
|||||||
/* Error occurs revert back the previous set large buffer*/
|
/* Error occurs revert back the previous set large buffer*/
|
||||||
intf->target_addr = intf->my_addr;
|
intf->target_addr = intf->my_addr;
|
||||||
|
|
||||||
ipmi_kontronoem_send_set_large_buffer( intf, 0x00, 0 );
|
//ipmi_kontronoem_send_set_large_buffer( intf, 0x00, 0 );
|
||||||
ipmi_kontronoem_send_set_large_buffer( intf, 0x0e, 0 );
|
ipmi_kontronoem_send_set_large_buffer( intf, 0x0e, 0 );
|
||||||
|
|
||||||
intf->target_addr = prev_target_addr;
|
intf->target_addr = prev_target_addr;
|
||||||
@ -243,8 +243,8 @@ int ipmi_kontronoem_send_set_large_buffer(struct ipmi_intf * intf, unsigned char
|
|||||||
}
|
}
|
||||||
if (rsp->ccode > 0)
|
if (rsp->ccode > 0)
|
||||||
{
|
{
|
||||||
printf("Invalid length for the selected interface (%s)\n",
|
printf("Invalid length for the selected interface (%s) %d\n",
|
||||||
val2str(rsp->ccode, completion_code_vals));
|
val2str(rsp->ccode, completion_code_vals), rsp->ccode);
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user