Skip to content

Commit

Permalink
thunderbolt: icm: Ignore mailbox errors in icm_suspend()
Browse files Browse the repository at this point in the history
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>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Michael Jamet <michael.jamet@intel.com>
  • Loading branch information
Rafael J. Wysocki committed Jul 31, 2017
1 parent 520eccd commit a684c5b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/thunderbolt/icm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand Down

0 comments on commit a684c5b

Please sign in to comment.