diff options
author | Yicheng Li <yichengli@chromium.org> | 2020-10-12 16:56:11 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-13 06:15:42 +0000 |
commit | 744409ffd01c36f03ce8c361962c9fa58cce4259 (patch) | |
tree | ceae257cb7b6a97ec4950a14ba3f4cb0493315d6 | |
parent | 7ae6bda8bd44aa8a906f42cbaa33710878247e5a (diff) | |
download | chrome-ec-744409ffd01c36f03ce8c361962c9fa58cce4259.tar.gz |
ectool: Do not retry FpFrame if EC_RES_ACCESS_DENIED
A previous change added retries to FpFrame on any error. However,
when the error is EC_RES_ACCESS_DENIED, it doesn't make sense to retry,
and it also doesn't match fingerprint tests' expectations. This
change skips the retry on EC_RES_ACCESS_DENIED.
BRANCH=none
BUG=b:170641381
TEST=`ectool --name=cros_fp fpframe raw` when system is locked now
outputs just one "EC result 4 (ACCESS_DENIED)" line.
Signed-off-by: Yicheng Li <yichengli@chromium.org>
Change-Id: Ibd3fd100b68e094e7905318761ceb89a500acd6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2466956
Commit-Queue: Tom Hughes <tomhughes@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
-rw-r--r-- | util/ectool.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/util/ectool.c b/util/ectool.c index 505c526892..09c27db530 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -1947,6 +1947,8 @@ static void *fp_download_frame(struct ec_response_fp_info *info, int index) ptr, stride); if (rv >= 0) break; + if (rv == -EECRESULT - EC_RES_ACCESS_DENIED) + break; usleep(100000); } if (rv < 0) { |