-Fixed lanplus session re-open when the target becomes unavailable following a fw upgrade activation.

----------------------------------------------------------------------
This commit is contained in:
Jean-Michel Audet 2008-06-10 17:29:09 +00:00
parent 5cf45e711e
commit b3d5558a40

View File

@ -2989,7 +2989,7 @@ struct ipmi_rs * HpmfwupgSendCmd(struct ipmi_intf *intf, struct ipmi_rq req,
* times which is not effecient -So reducing the Timout to 5 seconds which is * times which is not effecient -So reducing the Timout to 5 seconds which is
* almost 200 retries if it continuously recieves 0xC3 as completion code. * almost 200 retries if it continuously recieves 0xC3 as completion code.
*/ */
inaccessTimeout = 5; inaccessTimeout = HPMFWUPG_DEFAULT_UPGRADE_TIMEOUT;
upgradeTimeout = HPMFWUPG_DEFAULT_UPGRADE_TIMEOUT; upgradeTimeout = HPMFWUPG_DEFAULT_UPGRADE_TIMEOUT;
} }
@ -3010,6 +3010,7 @@ struct ipmi_rs * HpmfwupgSendCmd(struct ipmi_intf *intf, struct ipmi_rq req,
lprintf(LOG_DEBUG,"HPM: no response available"); lprintf(LOG_DEBUG,"HPM: no response available");
lprintf(LOG_DEBUG,"HPM: the command may be rejected for " \ lprintf(LOG_DEBUG,"HPM: the command may be rejected for " \
"security reasons"); "security reasons");
if if
( (
req.msg.netfn == IPMI_NETFN_PICMG req.msg.netfn == IPMI_NETFN_PICMG
@ -3041,7 +3042,7 @@ struct ipmi_rs * HpmfwupgSendCmd(struct ipmi_intf *intf, struct ipmi_rq req,
*/ */
lprintf(LOG_DEBUG,"HPM: activate/rollback firmware API called"); lprintf(LOG_DEBUG,"HPM: activate/rollback firmware API called");
lprintf(LOG_DEBUG,"HPM: returning in progress to handle IOL session lost"); lprintf(LOG_DEBUG,"HPM: returning in progress to handle IOL session lost");
fakeRsp.ccode = HPMFWUPG_COMMAND_IN_PROGRESS; fakeRsp.ccode = HPMFWUPG_COMMAND_IN_PROGRESS;
rsp = &fakeRsp; rsp = &fakeRsp;
} }
@ -3070,7 +3071,9 @@ struct ipmi_rs * HpmfwupgSendCmd(struct ipmi_intf *intf, struct ipmi_rq req,
intf->session->authtype = IPMI_SESSION_AUTHTYPE_NONE; intf->session->authtype = IPMI_SESSION_AUTHTYPE_NONE;
intf->session->session_id = 0; intf->session->session_id = 0;
intf->session->in_seq = 0; intf->session->in_seq = 0;
intf->session->out_seq = 0;
intf->session->active = 0; intf->session->active = 0;
intf->session->retry = 10;
while while
( (
@ -3079,9 +3082,8 @@ struct ipmi_rs * HpmfwupgSendCmd(struct ipmi_intf *intf, struct ipmi_rq req,
inaccessTimeoutCounter < inaccessTimeout inaccessTimeoutCounter < inaccessTimeout
) )
{ {
inaccessTimeoutCounter += time(NULL) - timeoutSec1; inaccessTimeoutCounter += (time(NULL) - timeoutSec1);
timeoutSec1 = time(NULL); timeoutSec1 = time(NULL);
usleep(100000);
} }
/* Fake timeout to retry command */ /* Fake timeout to retry command */
fakeRsp.ccode = 0xc3; fakeRsp.ccode = 0xc3;