Commit a19bf053 authored by Alexander Usyskin's avatar Alexander Usyskin Committed by Greg Kroah-Hartman

mei: expedite ioctl return on the notify set operation error

The notify set operation ioctl will wait till timeout is expired
even in case when the FW returned an error.
Check the status field of the client object in wait_event_timeout()
to determine if the caller can return earlier.
Signed-off-by: default avatarAlexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 87d63352
......@@ -1357,7 +1357,9 @@ int mei_cl_notify_request(struct mei_cl *cl,
mutex_unlock(&dev->device_lock);
wait_event_timeout(cl->wait,
cl->notify_en == request || !mei_cl_is_connected(cl),
cl->notify_en == request ||
cl->status ||
!mei_cl_is_connected(cl),
mei_secs_to_jiffies(MEI_CL_CONNECT_TIMEOUT));
mutex_lock(&dev->device_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment