thunderbolt: Wait a bit longer for ICM to authenticate the active NVM
authorMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 24 Nov 2017 14:51:12 +0000 (17:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:36:29 +0000 (09:36 +0200)
commit6f40f6ee22b91c913b2891c26943eb37bfceb50a
treecf76b81ba8d9747c352bbff684769429fe712dcc
parent73b969f6a92062a5c1547541a2608d1755a7954b
thunderbolt: Wait a bit longer for ICM to authenticate the active NVM

commit e4be8c9b6a512e274cb6bbac4ac869d73880a8b3 upstream.

Sometimes during cold boot ICM has not yet authenticated the active NVM
image leading to timeout and failing the driver probe. Allow ICM to take
some more time and increase the timeout to 3 seconds before we give up.

While there fix icm_firmware_init() to return the real error code
without overwriting it with -ENODEV.

Fixes: f67cf491175a ("thunderbolt: Add support for Internal Connection Manager (ICM)")
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thunderbolt/icm.c