summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2013-09-02 13:29:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-05 07:17:55 -0700
commitedc46d2142aaa5d46dd2475f4a1f948b11607cd0 (patch)
treea3f4cdcb2bb591595eaa6856e19aa8bf13a456f2
parentfcf584fd99282be126dfef1cd96f5064c4880ee7 (diff)
mei: cancel stall timers in mei_reset
commit 4a704575cc1afb3b848f096778fa9b8d7b3d5813 upstream. Unset init_clients_timer and amthif_stall_timers in mei_reset in order to cancel timer ticking and hence avoid recursive reset calls. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/misc/mei/amthif.c1
-rw-r--r--drivers/misc/mei/init.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c
index 749452f8e2f6..cf80bf5778fa 100644
--- a/drivers/misc/mei/amthif.c
+++ b/drivers/misc/mei/amthif.c
@@ -57,6 +57,7 @@ void mei_amthif_reset_params(struct mei_device *dev)
dev->iamthif_ioctl = false;
dev->iamthif_state = MEI_IAMTHIF_IDLE;
dev->iamthif_timer = 0;
+ dev->iamthif_stall_timer = 0;
}
/**
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index e6f16f83ecde..012b2e0856ba 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -169,6 +169,9 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled)
memset(&dev->wr_ext_msg, 0, sizeof(dev->wr_ext_msg));
}
+ /* we're already in reset, cancel the init timer */
+ dev->init_clients_timer = 0;
+
dev->me_clients_num = 0;
dev->rd_msg_hdr = 0;
dev->wd_pending = false;