From: Tomas Winkler <tomas.winkler@intel.com>
To: gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, alan@linux.intel.com,
devel@linuxdriverproject.org,
Tomas Winkler <tomas.winkler@intel.com>
Subject: [PATCH 4/4] misc: mei: fix stalled read
Date: Tue, 29 May 2012 16:39:12 +0300 [thread overview]
Message-ID: <1338298752-15445-5-git-send-email-tomas.winkler@intel.com> (raw)
In-Reply-To: <1338298752-15445-1-git-send-email-tomas.winkler@intel.com>
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>
---
drivers/misc/mei/interrupt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c
index 93936f1..23f5463 100644
--- a/drivers/misc/mei/interrupt.c
+++ b/drivers/misc/mei/interrupt.c
@@ -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);
--
1.7.4.4
next prev parent reply other threads:[~2012-05-29 13:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-29 13:39 misc: mei: fixes for 3.5 Tomas Winkler
2012-05-29 13:39 ` [PATCH 1/4 V2] mei: mei.txt: minor grammar fixes Tomas Winkler
2012-05-29 13:39 ` [PATCH 2/4] misc: mei: set IRQF_ONESHOT for msi request_threaded_irq Tomas Winkler
2012-05-29 13:39 ` [PATCH 3/4] misc: mei: unregister misc device in pci_remove function Tomas Winkler
2012-05-29 13:39 ` Tomas Winkler [this message]
2012-06-13 20:37 ` misc: mei: fixes for 3.5 Greg KH
2012-06-13 21:09 ` Winkler, Tomas
2012-06-13 21:45 ` Greg KH
2012-06-13 22:34 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1338298752-15445-5-git-send-email-tomas.winkler@intel.com \
--to=tomas.winkler@intel.com \
--cc=alan@linux.intel.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®