From 3e49738baa84958e8f62211e676ad326682bc0bb Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Wed, 6 Aug 2014 14:28:52 -0500 Subject: chromeec: correct response length for VBNV write The EC doesn't return any data when one performs a write to VBNV context. Therefore there is a mismatch of expectations. Correct this by properly setting the expected response length. BUG=chrome-os-partner:31148 BRANCH=None TEST=No longer hanging while writing to VBNV on ryu. Change-Id: I7077a507c3280358dac1f88ece62cacee9b71bea Signed-off-by: Patrick Georgi Original-Commit-Id: c1735c3377163aeb9e90155cb9f081a1eea919c9 Original-Change-Id: I455724f20f5442bd62a792f09273227417475f07 Original-Signed-off-by: Aaron Durbin Original-Reviewed-on: https://chromium-review.googlesource.com/211137 Original-Reviewed-by: Stefan Reinauer Original-Reviewed-by: Tom Warren Original-Reviewed-by: Furquan Shaikh Reviewed-on: http://review.coreboot.org/8826 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/ec/google/chromeec/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ec/google') diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c index 9e6e4d6691..7d35a046b5 100644 --- a/src/ec/google/chromeec/ec.c +++ b/src/ec/google/chromeec/ec.c @@ -194,7 +194,7 @@ int google_chromeec_vbnv_context(int is_read, uint8_t *data, int len) cec_cmd.cmd_data_in = &cmd_vbnvcontext; cec_cmd.cmd_data_out = &rsp_vbnvcontext; cec_cmd.cmd_size_in = sizeof(cmd_vbnvcontext); - cec_cmd.cmd_size_out = sizeof(rsp_vbnvcontext); + cec_cmd.cmd_size_out = is_read ? sizeof(rsp_vbnvcontext) : 0; cmd_vbnvcontext.op = is_read ? EC_VBNV_CONTEXT_OP_READ : EC_VBNV_CONTEXT_OP_WRITE; -- cgit v1.2.3