Skip to contentSkip to conversation

mei; updates for 4.18-rc2

PATCH In review Tomas Winkler 2 participants 6 messages Jun 6, 2018 – Jul 3, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover mei; updates for 4.18-rc2

A bug for long lasting regression and trivial cleanup. Hope this can make its way to 4.18.

Alexander Usyskin (2):
mei: remove unused MEI_IAMTHIF_STALL_TIMER define
mei: discard messages from not connected client during power down.

 drivers/misc/mei/hw.h        | 2 --
 drivers/misc/mei/interrupt.c | 5 ++++-
 2 files changed, 4 insertions(+), 3 deletions(-)
Signature · 1 line
2.14.4
#1 lore raw

PATCH 1/2 mei: remove unused MEI_IAMTHIF_STALL_TIMER define

From: Alexander Usyskin <[email protected]>

MEI_IAMTHIF_STALL_TIMER is unused now and can be safely removed.

---
 drivers/misc/mei/hw.h | 2 --
 1 file changed, 2 deletions(-)
drivers/misc/mei/hw.h +0 -2
index 5c8286b40b62..3b325d955fbe 100644
@@ -28,8 +28,6 @@
 #define MEI_CL_CONNECT_TIMEOUT     15  /* HPS: Client Connect Timeout */
 #define MEI_CLIENTS_INIT_TIMEOUT   15  /* HPS: Clients Enumeration Timeout */
 
-#define MEI_IAMTHIF_STALL_TIMER    12  /* HPS */
-
 #define MEI_PGI_TIMEOUT             1  /* PG Isolation time response 1 sec */
 #define MEI_D0I3_TIMEOUT            5  /* D0i3 set/unset max response time */
 #define MEI_HBM_TIMEOUT             1  /* 1 second */
Signature · 1 line
2.14.4
#3 lore raw

RE: [char-misc 1/2] mei: remove unused MEI_IAMTHIF_STALL_TIMER define

Quoted 7 lines · Tomas Winkler
Quoted 4 lines

From: Alexander Usyskin <[email protected]>

MEI_IAMTHIF_STALL_TIMER is unused now and can be safely removed.

Quoted 7 lines
Quoted 5 lines
---
 drivers/misc/mei/hw.h | 2 --
 1 file changed, 2 deletions(-)

Not a regression fix :(

No problem, please merge to next.
Thanks
Tomas

#4 lore raw

Re: [char-misc 1/2] mei: remove unused MEI_IAMTHIF_STALL_TIMER define

Quoted 13 lines · Tomas
Quoted 13 lines · Tomas Winkler
Quoted 9 lines

From: Alexander Usyskin <[email protected]>

MEI_IAMTHIF_STALL_TIMER is unused now and can be safely removed.

---
 drivers/misc/mei/hw.h | 2 --
 1 file changed, 2 deletions(-)
Quoted 3 lines
Quoted 1 line

Not a regression fix :(

No problem, please merge to next.

Already done! :)

#5 lore raw

PATCH 2/2 mei: discard messages from not connected client during power down.

In reply to Tomas Winkler

From: Alexander Usyskin <[email protected]>

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.

Fixes 8d52af6795c0 ("mei: speed up the power down flow")

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199541

---
 drivers/misc/mei/interrupt.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/misc/mei/interrupt.c +4 -1
index b0b8f18a85e3..6649f0d56d2f 100644
@@ -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;
Signature · 1 line
2.14.4