]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
misc: mei: fix stalled read
authorTomas Winkler <tomas.winkler@intel.com>
Tue, 29 May 2012 13:39:12 +0000 (16:39 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Jun 2012 20:52:14 +0000 (13:52 -0700)
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 1ccb7b6249f9bc50678e2a383084ed0a34cc9239
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: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/interrupt.c

index 93936f1b75eb1d89ac47a75284eebc3f1504df15..23f5463d4cae432e5e1b65ac97e5ba6042a2c59e 100644 (file)
@@ -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);