diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2016-12-04 15:22:58 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-12-06 11:03:22 +0100 |
commit | 4a8efd4a1a9593a11c808da94e6609f6d4ee7276 (patch) | |
tree | eab8e4f71db36b5d70e480f09d1e90acf6119a27 /drivers/misc/mei/init.c | |
parent | 8d7cc7adcec55bfeb28cc2dc58b996c95f180337 (diff) | |
download | linux-4a8efd4a1a9593a11c808da94e6609f6d4ee7276.tar.bz2 |
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.c | 6 |
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) mei_dev_state_str(state), fw_sts_str); } + mei_clear_interrupts(dev); + + mei_synchronize_irq(dev); + /* we're already in reset, cancel the init timer * if the reset was called due the hbm protocol error * we need to call it before hw start @@ -273,8 +277,6 @@ int mei_restart(struct mei_device *dev) mutex_lock(&dev->device_lock); - mei_clear_interrupts(dev); - dev->dev_state = MEI_DEV_POWER_UP; dev->reset_count = 0; |