thunderbolt: icm: Ignore mailbox errors in icm_suspend()
authorRafael J. Wysocki <[email protected]>
Mon, 24 Jul 2017 23:31:00 +0000 (01:31 +0200)
committerRafael J. Wysocki <[email protected]>
Mon, 31 Jul 2017 11:24:29 +0000 (13:24 +0200)
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 <[email protected]>
Acked-by: Mika Westerberg <[email protected]>
Acked-by: Michael Jamet <[email protected]>
drivers/thunderbolt/icm.c

index 8ee34029021986c94319e20adf4d36ce1d4ef374..bdaac1ff00a5af7518da6e3e03a2c8e6ef99a11b 100644 (file)
@@ -904,7 +904,14 @@ static int icm_driver_ready(struct tb *tb)
 
 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;
 }
 
 /*