aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/interrupt.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2014-01-08 13:19:21 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-08 18:25:15 -0500
commit544f94601409653f07ae6e22d4a39e3a90dceead (patch)
tree0939fcf8facae8633eebe3fd40b4f4f00788d76e /drivers/misc/mei/interrupt.c
parent634608f27acd098b245ca6fe60e06701185eb170 (diff)
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.c9
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,
329 329
330 /* HBM message */ 330 /* HBM message */
331 if (mei_hdr->host_addr == 0 && mei_hdr->me_addr == 0) { 331 if (mei_hdr->host_addr == 0 && mei_hdr->me_addr == 0) {
332 mei_hbm_dispatch(dev, mei_hdr); 332 ret = mei_hbm_dispatch(dev, mei_hdr);
333 ret = 0; 333 if (ret) {
334 dev_dbg(&dev->pdev->dev, "mei_hbm_dispatch.\n"); 334 dev_dbg(&dev->pdev->dev, "mei_hbm_dispatch failed ret = %d\n",
335 ret);
336 goto end;
337 }
335 goto reset_slots; 338 goto reset_slots;
336 } 339 }
337 340