summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoe, YiCheng <yicheng.doe@hp.com>2011-03-10 14:00:21 -0600
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-10 13:21:16 -0800
commit4c418ba9695a24917a1fcfa48f7db3fd76337eb7 (patch)
tree7a8704fb09901f51f3e9dd8ea55930bfd5ca92ed
parent4afcc10a65bb1f30c4fa1dec2634df74160a8054 (diff)
downloadlinux-4c418ba9695a24917a1fcfa48f7db3fd76337eb7.tar.gz
linux-4c418ba9695a24917a1fcfa48f7db3fd76337eb7.tar.bz2
linux-4c418ba9695a24917a1fcfa48f7db3fd76337eb7.zip
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>
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 7855f9f45b8e..62787e30d508 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -900,6 +900,14 @@ static void sender(void *send_info,
printk("**Enqueue: %d.%9.9d\n", t.tv_sec, t.tv_usec);
#endif
+ /*
+ * last_timeout_jiffies is updated here to avoid
+ * smi_timeout() handler passing very large time_diff
+ * value to smi_event_handler() that causes
+ * the send command to abort.
+ */
+ smi_info->last_timeout_jiffies = jiffies;
+
mod_timer(&smi_info->si_timer, jiffies + SI_TIMEOUT_JIFFIES);
if (smi_info->thread)