|
5 | 5 | /* */
|
6 | 6 | /* OpenPOWER HostBoot Project */
|
7 | 7 | /* */
|
8 |
| -/* Contributors Listed Below - COPYRIGHT 2012,2018 */ |
| 8 | +/* Contributors Listed Below - COPYRIGHT 2012,2019 */ |
9 | 9 | /* [+] International Business Machines Corp. */
|
10 | 10 | /* */
|
11 | 11 | /* */
|
@@ -905,18 +905,20 @@ void IpmiRP::queueForResponse(IPMI::Message& i_msg)
|
905 | 905 | mutex_lock(&iv_mutex);
|
906 | 906 |
|
907 | 907 | // BMC request-to-response times are always seconds, 1 - 30.
|
908 |
| - // And I don't think we care about roll over here. |
909 |
| - i_msg.iv_timeout.tv_sec += iv_bmc_timeout; |
| 908 | + // And I don't think we care about roll over here. Enforce the |
| 909 | + // timeout as a timeout per-message. Meaning if there are 2 |
| 910 | + // messages on the timeout queue, make the timeout of this message |
| 911 | + // iv_bmc_timeout + iv_bmc_timeout*2 |
| 912 | + i_msg.iv_timeout.tv_sec += |
| 913 | + (iv_bmc_timeout + (iv_bmc_timeout*iv_timeoutq.size()) ); |
910 | 914 |
|
911 | 915 | // Put this message on the response queue so we can find it later
|
912 | 916 | // for a response and on the timeout queue so if it times out
|
913 | 917 | // we can find it there. Note all message will all have the same
|
914 | 918 | // timeout - mostly. Every message sent before the BMC tells us
|
915 | 919 | // the timeout (at least one message) will have the shortest possible
|
916 | 920 | // timeout. The BMC might lengthen the timeout, but can not shorten
|
917 |
| - // it. All messages after that will have the same timeout. So the |
918 |
| - // timeout queue is "sorted." |
919 |
| - |
| 921 | + // it. |
920 | 922 | iv_respondq[i_msg.iv_seq] = i_msg.iv_msg;
|
921 | 923 | iv_timeoutq.push_back(i_msg.iv_msg);
|
922 | 924 |
|
|
0 commit comments