Skip to content

Commit a19bf05

Browse files
ausyskingregkh
authored andcommitted
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: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 87d6335 commit a19bf05

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎drivers/misc/mei/client.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,9 @@ int mei_cl_notify_request(struct mei_cl *cl,
13571357

13581358
mutex_unlock(&dev->device_lock);
13591359
wait_event_timeout(cl->wait,
1360-
cl->notify_en == request || !mei_cl_is_connected(cl),
1360+
cl->notify_en == request ||
1361+
cl->status ||
1362+
!mei_cl_is_connected(cl),
13611363
mei_secs_to_jiffies(MEI_CL_CONNECT_TIMEOUT));
13621364
mutex_lock(&dev->device_lock);
13631365

0 commit comments

Comments
 (0)