Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e69d64a authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman
Browse files

misc: mei: fix stalled read



This bug caused severe connectivity issue in the LMS application
(LMS is described in  Documentation/misc-devices/mei/mei.txt)

The bug was introduced in patch:
commit 1ccb7b62
staging/mei: propagate error codes up in the write flow

The patch has reverted the return value logic of some fo function but
the conditional in _mei_irq_thread_read function was not swapped
making read always entering the error path

Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a44cab4a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -835,7 +835,7 @@ static int _mei_irq_thread_read(struct mei_device *dev, s32 *slots,
			struct mei_cl *cl,
			struct mei_io_list *cmpl_list)
{
	if ((*slots * sizeof(u32)) >= (sizeof(struct mei_msg_hdr) +
	if ((*slots * sizeof(u32)) < (sizeof(struct mei_msg_hdr) +
			sizeof(struct hbm_flow_control))) {
		/* return the cancel routine */
		list_del(&cb_pos->cb_list);