public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH] thunderbolt: icm: Ignore mailbox errors in icm_suspend()
@ 2017-07-24 23:31 Rafael J. Wysocki
  2017-07-25 10:00 ` Mika Westerberg
  0 siblings, 1 reply; 12+ messages in thread
From: Rafael J. Wysocki @ 2017-07-24 23:31 UTC (permalink / raw)
  To: Mika Westerberg
  Cc: LKML, Linux PM, Andreas Noever, Michael Jamet, Greg Kroah-Hartman

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

On one of my test machines nhi_mailbox_cmd() called from icm_suspend()
times out and returnes an error which then is propagated to the
caller and causes the entire system suspend to be aborted which isn't
very useful.

Instead of aborting system suspend, print the error into the log
and continue.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/thunderbolt/icm.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Index: linux-pm/drivers/thunderbolt/icm.c
===================================================================
--- linux-pm.orig/drivers/thunderbolt/icm.c
+++ linux-pm/drivers/thunderbolt/icm.c
@@ -904,7 +904,14 @@ static int icm_driver_ready(struct tb *t
 
 static int icm_suspend(struct tb *tb)
 {
-	return nhi_mailbox_cmd(tb->nhi, NHI_MAILBOX_SAVE_DEVS, 0);
+	int ret;
+
+	ret = nhi_mailbox_cmd(tb->nhi, NHI_MAILBOX_SAVE_DEVS, 0);
+	if (ret)
+		tb_info(tb, "Ignoring mailbox command error (%d) in %s\n",
+			ret, __func__);
+
+	return 0;
 }
 
 /*

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-07-31 16:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-24 23:31 [RFC][PATCH] thunderbolt: icm: Ignore mailbox errors in icm_suspend() Rafael J. Wysocki
2017-07-25 10:00 ` Mika Westerberg
2017-07-25 16:10   ` Rafael J. Wysocki
2017-07-26  8:32     ` Mika Westerberg
2017-07-26 12:48       ` Rafael J. Wysocki
2017-07-26 13:12         ` Mika Westerberg
2017-07-26 17:05           ` Rafael J. Wysocki
2017-07-27  8:50             ` Mika Westerberg
2017-07-27 23:56               ` Rafael J. Wysocki
2017-07-31  7:00             ` Jamet, Michael
2017-07-31  9:36               ` Andy Shevchenko
2017-07-31 16:01               ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox