diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2014-01-08 19:19:21 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-09 00:25:15 +0100 |
commit | 544f94601409653f07ae6e22d4a39e3a90dceead (patch) | |
tree | 0939fcf8facae8633eebe3fd40b4f4f00788d76e /drivers/misc/mei/interrupt.c | |
parent | misc: genwqe: fix return value check in genwqe_device_create() (diff) | |
download | linux-544f94601409653f07ae6e22d4a39e3a90dceead.tar.xz linux-544f94601409653f07ae6e22d4a39e3a90dceead.zip |
mei: do not run reset flow from the interrupt thread
This fixes a potential deadlock in case of a firmware
initiated reset
mei_reset has a dialog with the interrupt thread hence
it has to be run from an another work item
Most of the mei_resets were called from mei_hbm_dispatch
which is called in interrupt thread context so this
function underwent major revamp. The error code is
propagated to the interrupt thread and if needed
the reset is scheduled from there.
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.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c index 9c8225b945c3..bbb61bec863b 100644 --- a/drivers/misc/mei/interrupt.c +++ b/drivers/misc/mei/interrupt.c @@ -329,9 +329,12 @@ int mei_irq_read_handler(struct mei_device *dev, /* HBM message */ if (mei_hdr->host_addr == 0 && mei_hdr->me_addr == 0) { - mei_hbm_dispatch(dev, mei_hdr); - ret = 0; - dev_dbg(&dev->pdev->dev, "mei_hbm_dispatch.\n"); + ret = mei_hbm_dispatch(dev, mei_hdr); + if (ret) { + dev_dbg(&dev->pdev->dev, "mei_hbm_dispatch failed ret = %d\n", + ret); + goto end; + } goto reset_slots; } |