summaryrefslogtreecommitdiff
path: root/firmware/lib/ec_sync_all.c
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@google.com>2017-08-11 17:07:10 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-08-21 17:55:25 -0700
commit5afa7faf7bfc4ec5efd22af5f2124a575bc64e52 (patch)
treeb53159d411d583c322e90b3df1348ca621ee7f21 /firmware/lib/ec_sync_all.c
parent8610346356a56d6f1b78f5eb9da456d11fc8264f (diff)
downloadvboot-5afa7faf7bfc4ec5efd22af5f2124a575bc64e52.tar.gz
ec_sync: always call VbExUpdateAuxFw
call VbExUpdateAuxFw() uncontidionally, instead of when we know we need to do an update. Vb*AuxFw() already maintains state, so this doesn't change when we (attempt) to update firmware. however, this does allow us to iterate over all firmware drivers to call their .protect() method. previously, we would only call .protect() after an actual firmware update. updated unit tests to match the new logic. BRANCH=none BUG=b:35585700 TEST=verified i2c tunnels are protected on reef using ectool i2cprotect N status. Change-Id: I9244db28ed181f568d117092307293202257735b Signed-off-by: Caveh Jalali <caveh@google.com> Reviewed-on: https://chromium-review.googlesource.com/620281 Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'firmware/lib/ec_sync_all.c')
-rw-r--r--firmware/lib/ec_sync_all.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/firmware/lib/ec_sync_all.c b/firmware/lib/ec_sync_all.c
index af06b0ec..aeec6079 100644
--- a/firmware/lib/ec_sync_all.c
+++ b/firmware/lib/ec_sync_all.c
@@ -71,11 +71,9 @@ VbError_t ec_sync_all(struct vb2_context *ctx, struct VbCommonParams *cparams)
/*
* Do software sync for devices tunneled throught the EC.
*/
- if (fw_update != VB_AUX_FW_NO_UPDATE) {
- rv = VbExUpdateAuxFw();
- if (rv)
- return rv;
- }
+ rv = VbExUpdateAuxFw();
+ if (rv)
+ return rv;
/*
* Reboot to unload VGA Option ROM if: