Commit 4c418ba9695a24917a1fcfa48f7db3fd76337eb7

Authored by Doe, YiCheng
Committed by Linus Torvalds
1 parent 4afcc10a65

ipmi: Fix IPMI errors due to timing problems

This patch fixes an issue in OpenIPMI module where sometimes an ABORT command
is sent after sending an IPMI request to BMC causing the IPMI request to fail.

Signed-off-by: YiCheng Doe <yicheng.doe@hp.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Acked-by: Tom Mingarelli <thomas.mingarelli@hp.com>
Tested-by: Andy Cress <andy.cress@us.kontron.com>
Tested-by: Mika Lansirine <Mika.Lansirinne@stonesoft.com>
Tested-by: Brian De Wolf <bldewolf@csupomona.edu>
Cc: Jean Michel Audet <Jean-Michel.Audet@ca.Kontron.com>
Cc: Jozef Sudelsky <jozef.sudolsky@elbiahosting.sk>
Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 8 additions and 0 deletions Side-by-side Diff

drivers/char/ipmi/ipmi_si_intf.c
... ... @@ -900,6 +900,14 @@
900 900 printk("**Enqueue: %d.%9.9d\n", t.tv_sec, t.tv_usec);
901 901 #endif
902 902  
  903 + /*
  904 + * last_timeout_jiffies is updated here to avoid
  905 + * smi_timeout() handler passing very large time_diff
  906 + * value to smi_event_handler() that causes
  907 + * the send command to abort.
  908 + */
  909 + smi_info->last_timeout_jiffies = jiffies;
  910 +
903 911 mod_timer(&smi_info->si_timer, jiffies + SI_TIMEOUT_JIFFIES);
904 912  
905 913 if (smi_info->thread)