Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1695265
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC][PATCH] thunderbolt: icm: Ignore mailbox errors in icm_suspend() |
| Date | 2017-07-25 01:40 +0200 |
| Message-ID | <u6V7b-3vi-11@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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;
}
/*
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[RFC][PATCH] thunderbolt: icm: Ignore mailbox errors in icm_suspend() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-25 01:40 +0200
Re: [RFC][PATCH] thunderbolt: icm: Ignore mailbox errors in icm_suspend() Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-07-25 12:10 +0200
Re: [RFC][PATCH] thunderbolt: icm: Ignore mailbox errors in icm_suspend() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-25 18:20 +0200
Re: [RFC][PATCH] thunderbolt: icm: Ignore mailbox errors in icm_suspend() Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-07-26 10:40 +0200
Re: [RFC][PATCH] thunderbolt: icm: Ignore mailbox errors in icm_suspend() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-26 15:00 +0200
Re: [RFC][PATCH] thunderbolt: icm: Ignore mailbox errors in icm_suspend() Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-07-26 15:20 +0200
Re: [RFC][PATCH] thunderbolt: icm: Ignore mailbox errors in icm_suspend() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-26 19:20 +0200
Re: [RFC][PATCH] thunderbolt: icm: Ignore mailbox errors in icm_suspend() Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-07-27 11:00 +0200
Re: [RFC][PATCH] thunderbolt: icm: Ignore mailbox errors in icm_suspend() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-28 02:10 +0200
RE: [RFC][PATCH] thunderbolt: icm: Ignore mailbox errors in icm_suspend() "Jamet, Michael" <michael.jamet@intel.com> - 2017-07-31 09:10 +0200
Re: [RFC][PATCH] thunderbolt: icm: Ignore mailbox errors in icm_suspend() Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-07-31 11:40 +0200
csiph-web