Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a684c5b1 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

thunderbolt: icm: Ignore mailbox errors in icm_suspend()



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: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: default avatarMichael Jamet <michael.jamet@intel.com>
parent 520eccdf
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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;
}

/*