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>
Šī revīzija ir iekļauta:
Alexander Usyskin
2014-04-27 15:42:21 +03:00
revīziju iesūtīja Greg Kroah-Hartman
vecāks 86113500c0
revīzija e4d8270e60
5 mainīti faili ar 1 papildinājumiem un 7 dzēšanām

Parādīt failu

@@ -427,8 +427,6 @@ int mei_cl_enable_device(struct mei_cl_device *device)
mutex_lock(&dev->device_lock);
cl->state = MEI_FILE_CONNECTING;
err = mei_cl_connect(cl, NULL);
if (err < 0) {
mutex_unlock(&dev->device_lock);