FROMLIST: platform/chrome: cros_ec_proto: Send command again when timeout occurs

Sometimes kernel is trying to probe Fingerprint MCU (FPMCU) when it
hasn't initialized SPI yet. This can happen because FPMCU is restarted
during system boot and kernel can send message in short window
eg. between sysjump to RW and SPI initialization.

Cc: <stable@vger.kernel.org> # 4.4+
Signed-off-by: Patryk Duda <pdk@semihalf.com>
(am from https://lore.kernel.org/patchwork/patch/1431296/)
(also found at https://lore.kernel.org/r/20210518140758.29318-1-pdk@semihalf.com)

BUG=b:185467818
TEST=Test on CoachZ SKU1 in secure (normal) mode. Shutdown device first
     and then press power button (don't use 'reboot' command). Make sure
     that kernel recognizes FPMCU.

Change-Id: I71ff910a0d102cf903832216c4925864a61e40f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2878837
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
Reviewed-by: Craig Hesling <hesling@chromium.org>
Tested-by: Patryk Duda <pdk@semihalf.com>
Commit-Queue: Patryk Duda <pdk@semihalf.com>
Commit-Queue: Alexandru M Stan <amstan@chromium.org>
(cherry picked from commit 47f31a43eea653004995d086194223f451bb21ba)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2965134
Commit-Queue: Kai Yee Wan <kyw@google.com>
Tested-by: Kai Yee Wan <kyw@google.com>
Auto-Submit: Kai Yee Wan <kyw@google.com>
1 file changed