Patch "platform/chrome: cros_ec_proto: Send command again when timeout occurs" has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     platform-chrome-cros_ec_proto-send-command-again-when-timeout-occurs.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 3abc16af57c9939724df92fcbda296b25cc95168 Mon Sep 17 00:00:00 2001
From: Patryk Duda <pdk@xxxxxxxxxxxx>
Date: Tue, 18 May 2021 16:07:58 +0200
Subject: platform/chrome: cros_ec_proto: Send command again when timeout occurs

From: Patryk Duda <pdk@xxxxxxxxxxxx>

commit 3abc16af57c9939724df92fcbda296b25cc95168 upstream.

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@xxxxxxxxxxxxxxx> # 4.4+
Signed-off-by: Patryk Duda <pdk@xxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20210518140758.29318-1-pdk@xxxxxxxxxxxx
Signed-off-by: Benson Leung <bleung@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/platform/chrome/cros_ec_proto.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- a/drivers/platform/chrome/cros_ec_proto.c
+++ b/drivers/platform/chrome/cros_ec_proto.c
@@ -279,6 +279,15 @@ static int cros_ec_host_command_proto_qu
 	msg->insize = sizeof(struct ec_response_get_protocol_info);
 
 	ret = send_command(ec_dev, msg);
+	/*
+	 * Send command once again when timeout occurred.
+	 * Fingerprint MCU (FPMCU) is restarted during system boot which
+	 * introduces small window in which FPMCU won't respond for any
+	 * messages sent by kernel. There is no need to wait before next
+	 * attempt because we waited at least EC_MSG_DEADLINE_MS.
+	 */
+	if (ret == -ETIMEDOUT)
+		ret = send_command(ec_dev, msg);
 
 	if (ret < 0) {
 		dev_dbg(ec_dev->dev,


Patches currently in stable-queue which might be from pdk@xxxxxxxxxxxx are

queue-5.14/platform-chrome-cros_ec_proto-send-command-again-when-timeout-occurs.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux