mei: move read cb to complete queue if not connected

Move read cb to the completion queue if a read finds out that client
is not connected. This expedite user space reader wake on error
condition.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Alexander Usyskin 2016-06-16 17:58:56 +03:00 committed by Greg Kroah-Hartman
parent 2d4d5481e2
commit a03c608f25
1 changed files with 1 additions and 0 deletions

View File

@ -113,6 +113,7 @@ int mei_cl_irq_read_msg(struct mei_cl *cl,
if (!mei_cl_is_connected(cl)) {
cl_dbg(dev, cl, "not connected\n");
list_move_tail(&cb->list, &complete_list->list);
cb->status = -ENODEV;
goto out;
}