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>
This commit is contained in:
Tomas Winkler
2014-01-08 20:19:21 +02:00
committed by Greg Kroah-Hartman
父節點 634608f27a
當前提交 544f946014
共有 6 個文件被更改,包括 211 次插入139 次删除

查看文件

@@ -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;
}