summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/interrupt.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2014-02-17 14:13:21 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-18 19:05:07 +0100
commit64092858acfd995fae0def466126692423c30828 (patch)
tree6ec7408d1a8705e170d7aa668901f46b1eb4701b /drivers/misc/mei/interrupt.c
parentmei: hbm: revamp client connect and disconnection status (diff)
downloadlinux-64092858acfd995fae0def466126692423c30828.tar.xz
linux-64092858acfd995fae0def466126692423c30828.zip
mei: wd and amthif use mei_cl_ api for dis/connection
Connect wd and amthif through regular mei_cl_connect API as there is no reason to connect in asynchronous mode. Also use mei_cl_is_connected in order to protect flows instead of depending on wd_pending and amthif_timer Now we can remove all the special handling in hbm layer Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/interrupt.c')
-rw-r--r--drivers/misc/mei/interrupt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c
index 75ff4092953e..61ceb781cd20 100644
--- a/drivers/misc/mei/interrupt.c
+++ b/drivers/misc/mei/interrupt.c
@@ -487,7 +487,7 @@ int mei_irq_write_handler(struct mei_device *dev, struct mei_cl_cb *cmpl_list)
wake_up_interruptible(&dev->wait_stop_wd);
}
- if (dev->dev_state == MEI_DEV_ENABLED) {
+ if (mei_cl_is_connected(&dev->wd_cl)) {
if (dev->wd_pending &&
mei_cl_flow_ctrl_creds(&dev->wd_cl) > 0) {
if (mei_wd_send(dev))
@@ -613,6 +613,9 @@ void mei_timer(struct work_struct *work)
}
}
+ if (!mei_cl_is_connected(&dev->iamthif_cl))
+ goto out;
+
if (dev->iamthif_stall_timer) {
if (--dev->iamthif_stall_timer == 0) {
dev_err(&dev->pdev->dev, "timer: amthif hanged.\n");