ipmi_si: Avoid a wrong long timeout on transaction done
authorCorey Minyard <cminyard@mvista.com>
Mon, 25 Jan 2016 22:11:20 +0000 (16:11 -0600)
committerCorey Minyard <cminyard@mvista.com>
Fri, 18 Mar 2016 12:01:23 +0000 (07:01 -0500)
Under some circumstances, the IPMI state machine could return
a call without delay option but the driver would still do a long
delay because the result wasn't checked.  Instead of calling
the state machine after transaction done, just go back to the
top of the processing to start over.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
drivers/char/ipmi/ipmi_si_intf.c

index 488d65ef1e725449c9b1bcd865d539a9310bb815..8671236013f800d67e2d0375940b4f26818ba82c 100644 (file)
@@ -849,7 +849,7 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info,
                smi_inc_stat(smi_info, complete_transactions);
 
                handle_transaction_done(smi_info);
-               si_sm_result = smi_info->handlers->event(smi_info->si_sm, 0);
+               goto restart;
        } else if (si_sm_result == SI_SM_HOSED) {
                smi_inc_stat(smi_info, hosed_count);
 
@@ -866,7 +866,7 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info,
                         */
                        return_hosed_msg(smi_info, IPMI_ERR_UNSPECIFIED);
                }
-               si_sm_result = smi_info->handlers->event(smi_info->si_sm, 0);
+               goto restart;
        }
 
        /*