summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@google.com>2017-04-28 08:29:26 +0800
committerchrome-bot <chrome-bot@chromium.org>2017-05-02 00:01:35 -0700
commit38016e0f94bb30ac634c95d2174aae7867137e34 (patch)
tree83048a9e0b1b8b72b4ebf552f7c07cdad0268cbc
parentec04eabb0190afdbf6d3ebbb9419c16fe4f407f0 (diff)
downloadchrome-ec-38016e0f94bb30ac634c95d2174aae7867137e34.tar.gz
common/usb_update: Support CMD_UNLOCK_RW even with CONFIG_RWSIG is unset
Starting with be294d4ef "hammer: Only define required options for RO and RW" we do not define CONFIG_RWSIG for the RW section. However, we want CMD_UNLOCK_RW to be usable when EC is in RW section, to unlock itself in prevision for an update on the next reboot. BRANCH=none BUG=b:35587171 TEST=Update hammer using usb_updater2 Change-Id: I7ae001363697bc3e17d4a59b21413d35101228cb Reviewed-on: https://chromium-review.googlesource.com/489888 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--common/usb_update.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/usb_update.c b/common/usb_update.c
index 53aa9d09ae..4d4c65d906 100644
--- a/common/usb_update.c
+++ b/common/usb_update.c
@@ -191,11 +191,11 @@ static int try_vendor_command(struct consumer const *consumer, size_t count)
rwsig_abort();
response = EC_RES_SUCCESS;
break;
+#endif
case UPDATE_EXTRA_CMD_UNLOCK_RW:
flash_set_protect(EC_FLASH_PROTECT_RW_AT_BOOT, 0);
response = EC_RES_SUCCESS;
break;
-#endif
default:
response = EC_RES_INVALID_COMMAND;
}