diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2016-12-04 14:22:58 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-12-06 11:03:22 +0100 |
commit | 4a8efd4a1a9593a11c808da94e6609f6d4ee7276 (patch) | |
tree | eab8e4f71db36b5d70e480f09d1e90acf6119a27 /drivers/misc/mei/hw-me.c | |
parent | VME: Remove shutdown entry from vme_driver (diff) | |
download | linux-4a8efd4a1a9593a11c808da94e6609f6d4ee7276.tar.xz linux-4a8efd4a1a9593a11c808da94e6609f6d4ee7276.zip |
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/hw-me.c')
-rw-r--r-- | drivers/misc/mei/hw-me.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c index 998f7fc0e920..e2b56e8cf745 100644 --- a/drivers/misc/mei/hw-me.c +++ b/drivers/misc/mei/hw-me.c @@ -285,6 +285,18 @@ static void mei_me_intr_disable(struct mei_device *dev) } /** + * mei_me_synchronize_irq - wait for pending IRQ handlers + * + * @dev: the device structure + */ +static void mei_me_synchronize_irq(struct mei_device *dev) +{ + struct pci_dev *pdev = to_pci_dev(dev->dev); + + synchronize_irq(pdev->irq); +} + +/** * mei_me_hw_reset_release - release device from the reset * * @dev: the device structure @@ -1238,6 +1250,7 @@ static const struct mei_hw_ops mei_me_hw_ops = { .intr_clear = mei_me_intr_clear, .intr_enable = mei_me_intr_enable, .intr_disable = mei_me_intr_disable, + .synchronize_irq = mei_me_synchronize_irq, .hbuf_free_slots = mei_me_hbuf_empty_slots, .hbuf_is_ready = mei_me_hbuf_is_empty, |