mei: revamp client connection
Simplify connect state machine by changing the logic around Connection request in progress - only check if we have a callback in relevant queue. Extract common code into mei_cl_send_connect() function 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:

committad av
Greg Kroah-Hartman

förälder
3c66618295
incheckning
0c53357ca4
@@ -436,6 +436,12 @@ int mei_cl_enable_device(struct mei_cl_device *device)
|
||||
|
||||
mutex_lock(&dev->device_lock);
|
||||
|
||||
if (mei_cl_is_connected(cl)) {
|
||||
mutex_unlock(&dev->device_lock);
|
||||
dev_warn(dev->dev, "Already connected");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
err = mei_cl_connect(cl, NULL);
|
||||
if (err < 0) {
|
||||
mutex_unlock(&dev->device_lock);
|
||||
|
Referens i nytt ärende
Block a user