summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/cros_ec_sandbox.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c
index 429f1a9b26..4fcb2d96f5 100644
--- a/drivers/misc/cros_ec_sandbox.c
+++ b/drivers/misc/cros_ec_sandbox.c
@@ -313,13 +313,15 @@ static int process_cmd(struct ec_state *ec,
switch (req->op) {
case EC_VBNV_CONTEXT_OP_READ:
+ /* TODO(sjg@chromium.org): Support full-size context */
memcpy(resp->block, ec->vbnv_context,
- sizeof(resp->block));
- len = sizeof(*resp);
+ EC_VBNV_BLOCK_SIZE);
+ len = 16;
break;
case EC_VBNV_CONTEXT_OP_WRITE:
- memcpy(ec->vbnv_context, resp->block,
- sizeof(resp->block));
+ /* TODO(sjg@chromium.org): Support full-size context */
+ memcpy(ec->vbnv_context, req->block,
+ EC_VBNV_BLOCK_SIZE);
len = 0;
break;
default: