ipmi_hpmfwupg.c (33f9336e8522af712563699089c3227531586cdd) ipmi_hpmfwupg.c (eb54136775f63a6a159f3c55ee4772d7aa363cc4)
1/*
2 * Copyright (c) 2006 Kontron Canada, Inc. All Rights Reserved.
3 * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *

--- 2180 unchanged lines hidden (view full) ---

2189 * status most likely occurs when we are waiting for firmware
2190 * activation. Try to re-open the IOL session (re-open will work
2191 * once the IPMC recovers from firmware activation.
2192 */
2193 lprintf(LOG_DEBUG, "HPM: upg/rollback status firmware API called");
2194 lprintf(LOG_DEBUG, "HPM: try to re-open IOL session");
2195 {
2196 /* force session re-open */
1/*
2 * Copyright (c) 2006 Kontron Canada, Inc. All Rights Reserved.
3 * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *

--- 2180 unchanged lines hidden (view full) ---

2189 * status most likely occurs when we are waiting for firmware
2190 * activation. Try to re-open the IOL session (re-open will work
2191 * once the IPMC recovers from firmware activation.
2192 */
2193 lprintf(LOG_DEBUG, "HPM: upg/rollback status firmware API called");
2194 lprintf(LOG_DEBUG, "HPM: try to re-open IOL session");
2195 {
2196 /* force session re-open */
2197 intf->opened = 0;
2198 intf->session->authtype = IPMI_SESSION_AUTHTYPE_NONE;
2199 intf->session->session_id = 0;
2200 intf->session->in_seq = 0;
2201 intf->session->out_seq = 0;
2202 intf->session->active = 0;
2203 intf->session->retry = 10;
2197 intf->abort = 1;
2198 intf->close(intf);
2199
2204 while (intf->open(intf) == HPMFWUPG_ERROR
2205 && inaccessTimeoutCounter < inaccessTimeout) {
2206 inaccessTimeoutCounter += (time(NULL) - timeoutSec1);
2207 timeoutSec1 = time(NULL);
2208 }
2200 while (intf->open(intf) == HPMFWUPG_ERROR
2201 && inaccessTimeoutCounter < inaccessTimeout) {
2202 inaccessTimeoutCounter += (time(NULL) - timeoutSec1);
2203 timeoutSec1 = time(NULL);
2204 }
2205
2209 /* Fake timeout to retry command */
2210 fakeRsp.ccode = 0xc3;
2211 rsp = &fakeRsp;
2212 }
2213 }
2214 }
2215 }
2216 /* Handle inaccessibility timeout (rsp = NULL if IOL) */

--- 415 unchanged lines hidden ---
2206 /* Fake timeout to retry command */
2207 fakeRsp.ccode = 0xc3;
2208 rsp = &fakeRsp;
2209 }
2210 }
2211 }
2212 }
2213 /* Handle inaccessibility timeout (rsp = NULL if IOL) */

--- 415 unchanged lines hidden ---