summaryrefslogtreecommitdiff
path: root/src/ec/google/chromeec/crosec_proto.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2015-02-20 13:36:11 -0800
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-04-10 20:31:36 +0200
commit02e847b919b4807440ddb02bdfa7c8ac74edd7f2 (patch)
tree1954ae29c208fc7d0a3ce293be6768b41e82e0cc /src/ec/google/chromeec/crosec_proto.c
parent1c4743f86b928400e097830eba21a30ddb23f741 (diff)
downloadcoreboot-02e847b919b4807440ddb02bdfa7c8ac74edd7f2.tar.xz
cros_ec: Retry failed VBNV transactions
This patch adds a few retries to NVRAM read/write transactions with the EC. Failing to read the NVRAM is not fatal to the boot, but it's still pretty bad... especially since a single initial read failure will cause vboot to blindly reinitialize the whole NVRAM with zeroes, destroying important configuration bits like dev_boot_usb. The current EC transaction timeout is one second, so the three retries added here can potentially increase boot time by three seconds per transaction... but this shouldn't happen in any normal case anyway, and if there are errors a little extra wait is probably preferrable to nuking your NVRAM. (Also, added a missing newline to an error message in the EC code.) BRANCH=veyron BUG=chrome-os-partner:36924 TEST=Booted a Jerry with the power button bug with a 2 second press, noticed that the first two transactions failed but the third one succeeded. Change-Id: I5d1cf29ac1c555ea2336ebb0b0e0a3f7cbb9c3fd Signed-off-by: Stefan Reinauer <reinauer@chromium.org> Original-Commit-Id: 894a8a0b4a9805e92544b5e3dfa90baf6d36649a Original-Change-Id: I6267cdda2be2bad34541b687404c2434d3be345b Original-Signed-off-by: Julius Werner <jwerner@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/251694 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/9507 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/ec/google/chromeec/crosec_proto.c')
-rw-r--r--src/ec/google/chromeec/crosec_proto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ec/google/chromeec/crosec_proto.c b/src/ec/google/chromeec/crosec_proto.c
index 55a707db17..1183e827f1 100644
--- a/src/ec/google/chromeec/crosec_proto.c
+++ b/src/ec/google/chromeec/crosec_proto.c
@@ -235,7 +235,7 @@ static int send_command_proto3(struct chromeec_command *cec_command,
rv = crosec_io(out_bytes, in_bytes, context);
if (rv != 0) {
- printk(BIOS_ERR, "%s: failed to complete I/O: Err = %#x.",
+ printk(BIOS_ERR, "%s: failed to complete I/O: Err = %#x.\n",
__func__, rv >= 0 ? rv : -rv);
return -EC_RES_ERROR;
}