mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
Return hash status on HAST_START command
On HASH_START command, we should also fill in hash status in response so that the caller sees BUSY status in response. BUG=chrome-os-partner:23067 TEST=Along with u-boot change, corrupting EC RW followed by a warm reset doesn't result in shutdown. BRANCH=All Change-Id: Ie0c1b35d71bc0420b011f0413f92feb88138db4d Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/172380 Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
73589dbb66
commit
027be6fdbb
@@ -348,16 +348,15 @@ static int host_command_vboot_hash(struct host_cmd_handler_args *args)
|
||||
return EC_RES_SUCCESS;
|
||||
|
||||
case EC_VBOOT_HASH_START:
|
||||
return host_start_hash(p);
|
||||
|
||||
case EC_VBOOT_HASH_RECALC:
|
||||
rv = host_start_hash(p);
|
||||
if (rv != EC_RES_SUCCESS)
|
||||
return rv;
|
||||
|
||||
/* Wait for hash to finish */
|
||||
while (in_progress)
|
||||
usleep(1000);
|
||||
/* Wait for hash to finish if command is RECALC */
|
||||
if (p->cmd == EC_VBOOT_HASH_RECALC)
|
||||
while (in_progress)
|
||||
usleep(1000);
|
||||
|
||||
fill_response(r);
|
||||
args->response_size = sizeof(*r);
|
||||
|
||||
Reference in New Issue
Block a user