summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/client.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2013-07-25 20:15:53 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-26 17:54:30 -0700
commitb950ac1dabfcbf97b99f26fa75f86087e1960aef (patch)
treed9ef0e00c79acedc8eebdd3d61a460d7bbff962f /drivers/misc/mei/client.c
parent20138d6cb838aa01bb1b382dcb5f3d3a119ff2cb (diff)
downloadop-kernel-dev-b950ac1dabfcbf97b99f26fa75f86087e1960aef.zip
op-kernel-dev-b950ac1dabfcbf97b99f26fa75f86087e1960aef.tar.gz
mei: don't get stuck in select during reset
Clear pending connection after hw reset but before hw start and wake up the waiting task in poll. Signal POLLERR in select when device went through reset. Add wrapper mei_cl_is_connected for checking if the device and client are connected. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/client.c')
-rw-r--r--drivers/misc/mei/client.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index af1e602..e0684b4 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -635,10 +635,7 @@ int mei_cl_read_start(struct mei_cl *cl, size_t length)
dev = cl->dev;
- if (cl->state != MEI_FILE_CONNECTED)
- return -ENODEV;
-
- if (dev->dev_state != MEI_DEV_ENABLED)
+ if (!mei_cl_is_connected(cl))
return -ENODEV;
if (cl->read_cb) {
OpenPOWER on IntegriCloud