aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/init.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2016-12-04 08:22:58 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-12-06 05:03:22 -0500
commit4a8efd4a1a9593a11c808da94e6609f6d4ee7276 (patch)
treeeab8e4f71db36b5d70e480f09d1e90acf6119a27 /drivers/misc/mei/init.c
parent8d7cc7adcec55bfeb28cc2dc58b996c95f180337 (diff)
mei: synchronize irq before initiating a reset.
We need to synchronize irqs before issuing reset to make sure that the clients communication is concluded and doesn't leak to the reset flow and confusing the state machine. This issue is happening during suspend/resume stress testing. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/init.c')
-rw-r--r--drivers/misc/mei/init.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index 9a9c2484d107..41e5760a6886 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -122,6 +122,10 @@ int mei_reset(struct mei_device *dev)
122 mei_dev_state_str(state), fw_sts_str); 122 mei_dev_state_str(state), fw_sts_str);
123 } 123 }
124 124
125 mei_clear_interrupts(dev);
126
127 mei_synchronize_irq(dev);
128
125 /* we're already in reset, cancel the init timer 129 /* we're already in reset, cancel the init timer
126 * if the reset was called due the hbm protocol error 130 * if the reset was called due the hbm protocol error
127 * we need to call it before hw start 131 * we need to call it before hw start
@@ -273,8 +277,6 @@ int mei_restart(struct mei_device *dev)
273 277
274 mutex_lock(&dev->device_lock); 278 mutex_lock(&dev->device_lock);
275 279
276 mei_clear_interrupts(dev);
277
278 dev->dev_state = MEI_DEV_POWER_UP; 280 dev->dev_state = MEI_DEV_POWER_UP;
279 dev->reset_count = 0; 281 dev->reset_count = 0;
280 282