mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-11 18:35:28 +00:00
flash: Indicate that erase operation is in progress
Erasing the flash can take a while, by which time the host may have timed out. So pass an in-progress message back to the host before starting, and when done, stash the result for later collection. BUG=chrome-os-partner:12685 BRANCH=snow,link TEST=manual build and boot to kernel on snow Change-Id: I5566a5519a1c8b320573b20e1ea7660217b32a5e Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/30471
This commit is contained in:
@@ -265,6 +265,11 @@ static int flash_command_erase(struct host_cmd_handler_args *args)
|
||||
if (system_unsafe_to_overwrite(p->offset, p->size))
|
||||
return EC_RES_ACCESS_DENIED;
|
||||
|
||||
/* Indicate that we might be a while */
|
||||
#ifdef CONFIG_TASK_HOSTCMD
|
||||
args->result = EC_RES_IN_PROGRESS;
|
||||
host_send_response(args);
|
||||
#endif
|
||||
if (flash_erase(p->offset, p->size))
|
||||
return EC_RES_ERROR;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user