diff options
author | Alexander Usyskin <alexander.usyskin@intel.com> | 2014-04-27 15:42:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-03 19:21:56 -0400 |
commit | e4d8270e604c3202131bac607969605ac397b893 (patch) | |
tree | 923980006e425387991b49639d6d748e57640c8b /drivers/misc/mei/client.c | |
parent | 86113500c060bccb0f08bdcadcecc0bd267fd25a (diff) | |
download | blackbird-op-linux-e4d8270e604c3202131bac607969605ac397b893.tar.gz blackbird-op-linux-e4d8270e604c3202131bac607969605ac397b893.zip |
mei: set connecting state just upon connection request is sent to the fw
Adding power gating introduced new waiting state for client also during
connection attempt, a connection request can be queued for later either due
device is power gated or due to other on going connection.
We setting client connection state before start of full connect procedure so
in both cased the client state will be MEI_FILE_CONNECTING
which create interlock between the two connection attempts, both
detecting that another connection is in progress.
The interlock is resolved by moving client to connecting state
only upon connection request transmission, so the first
cb in queue can be processed.
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>
Diffstat (limited to 'drivers/misc/mei/client.c')
-rw-r--r-- | drivers/misc/mei/client.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index 3349f626aa88..59d20c599b16 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c @@ -597,6 +597,7 @@ int mei_cl_connect(struct mei_cl *cl, struct file *file) /* run hbuf acquire last so we don't have to undo */ if (!mei_cl_is_other_connecting(cl) && mei_hbuf_acquire(dev)) { + cl->state = MEI_FILE_CONNECTING; if (mei_hbm_cl_connect_req(dev, cl)) { rets = -ENODEV; goto out; |