aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/main.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2012-08-16 12:39:43 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-16 12:51:02 -0400
commitc216fdeb2e7371554c56ba457c374cce9c77f91a (patch)
tree9d88b3170a5470844e61ac90a30fd923d50df14b /drivers/misc/mei/main.c
parent248ffdf7c95726a8dae76e25fdb037899c5b77fa (diff)
mei: wd: decouple and revamp watchdog state machine
Before ME watchdog was exported through standard watchdog interface it was closed and started together with the mei device. The major issue is that closing ME watchdog disabled also MEI device, to fix this the watchdog state machine has to be independent from MEI state machine. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/main.c')
-rw-r--r--drivers/misc/mei/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index 5c557dd129d6..9a595338ae15 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -1060,7 +1060,9 @@ static void __devexit mei_remove(struct pci_dev *pdev)
1060 1060
1061 mutex_lock(&dev->device_lock); 1061 mutex_lock(&dev->device_lock);
1062 1062
1063 mei_wd_stop(dev, false); 1063 cancel_delayed_work(&dev->timer_work);
1064
1065 mei_wd_stop(dev);
1064 1066
1065 mei_device = NULL; 1067 mei_device = NULL;
1066 1068
@@ -1115,8 +1117,11 @@ static int mei_pci_suspend(struct device *device)
1115 if (!dev) 1117 if (!dev)
1116 return -ENODEV; 1118 return -ENODEV;
1117 mutex_lock(&dev->device_lock); 1119 mutex_lock(&dev->device_lock);
1120
1121 cancel_delayed_work(&dev->timer_work);
1122
1118 /* Stop watchdog if exists */ 1123 /* Stop watchdog if exists */
1119 err = mei_wd_stop(dev, true); 1124 err = mei_wd_stop(dev);
1120 /* Set new mei state */ 1125 /* Set new mei state */
1121 if (dev->dev_state == MEI_DEV_ENABLED || 1126 if (dev->dev_state == MEI_DEV_ENABLED ||
1122 dev->dev_state == MEI_DEV_RECOVERING_FROM_RESET) { 1127 dev->dev_state == MEI_DEV_RECOVERING_FROM_RESET) {