summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2018-06-07 00:31:48 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-03 13:13:07 +0200
commitb7a020bff31318fc8785e6f96b1d38c1625cf1fb (patch)
treeb3b717ca5d92b26afc3b98c73ba02e47eae48a63
parent90d72ce079791399ac255c75728f3c9e747b093d (diff)
downloadop-kernel-dev-b7a020bff31318fc8785e6f96b1d38c1625cf1fb.zip
op-kernel-dev-b7a020bff31318fc8785e6f96b1d38c1625cf1fb.tar.gz
mei: discard messages from not connected client during power down.
This fixes regression introduced by commit 8d52af6795c0 ("mei: speed up the power down flow") In power down or suspend flow a message can still be received from the FW because the clients fake disconnection. In normal case we interpret messages w/o destination as corrupted and link reset is performed in order to clean the channel, but during power down link reset is already in progress resulting in endless loop. To resolve the issue under power down flow we discard messages silently. Cc: <stable@vger.kernel.org> 4.16+ Fixes: 8d52af6795c0 ("mei: speed up the power down flow") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199541 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>
-rw-r--r--drivers/misc/mei/interrupt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c
index b0b8f18..6649f0d 100644
--- a/drivers/misc/mei/interrupt.c
+++ b/drivers/misc/mei/interrupt.c
@@ -310,8 +310,11 @@ int mei_irq_read_handler(struct mei_device *dev,
if (&cl->link == &dev->file_list) {
/* A message for not connected fixed address clients
* should be silently discarded
+ * On power down client may be force cleaned,
+ * silently discard such messages
*/
- if (hdr_is_fixed(mei_hdr)) {
+ if (hdr_is_fixed(mei_hdr) ||
+ dev->dev_state == MEI_DEV_POWER_DOWN) {
mei_irq_discard_msg(dev, mei_hdr);
ret = 0;
goto reset_slots;
OpenPOWER on IntegriCloud