Skip to content

Commit

Permalink
mei: cancel stall timers in mei_reset
Browse files Browse the repository at this point in the history
Unset init_clients_timer and amthif_stall_timers
in mei_reset in order to cancel timer ticking and hence
avoid recursive reset calls.

Cc:  <stable@vger.kernel.org> # 3.9+
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>
  • Loading branch information
Alexander Usyskin authored and Greg Kroah-Hartman committed Sep 26, 2013
1 parent e2b3164 commit 4a70457
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/misc/mei/amthif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
3 changes: 3 additions & 0 deletions drivers/misc/mei/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,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;
Expand Down

0 comments on commit 4a70457

Please sign in to comment.