From ddcecbe0893ae40a0fe2c27ed7a7cfe0f5bdce12 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Thu, 20 Jun 2013 13:23:38 -0700 Subject: drop: Ignore command version for FLASH_PROTECT command The ec driver does not yet pass the command version properly from app to the EC. This causes a failure when trying to read flashrom write protect status (command 0x15). The thing is that the command version is not even important for this command, as it was never implemented differently. As a quick fix - mark the command descriptor as supporting both versions. BRANCH=none BUG=chromium:239197 TEST=manual . on peach_pit (with fixed flashrom, coming under a separate fix): # flashrom -p ec --wp-status flashrom v0.9.4 : : on Linux 3.8.11 (armv7l), built with libpci 3.1.10, GCC 4.7.x-google 20130114 (prerelease), little endian WP: status: 0x00 WP: status.srp0: 0 WP: write protect is disabled. WP: write protect range: start=0x00000000, len=0x00000000 # Change-Id: I8302457cc2afdfe3bdcb50cfa2bea29969d0c107 Signed-off-by: Vadim Bendebury Reviewed-on: https://gerrit.chromium.org/gerrit/59462 Reviewed-by: Randall Spangler --- common/flash_common.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/flash_common.c b/common/flash_common.c index 2192fa2e07..30221c288d 100644 --- a/common/flash_common.c +++ b/common/flash_common.c @@ -599,9 +599,15 @@ static int flash_command_protect(struct host_cmd_handler_args *args) return EC_RES_SUCCESS; } + +/* + * TODO(crbug.com/239197) : Adding both versions to the version mask is a + * temporary workaround for a problem in the cros_ec driver. Drop + * EC_VER_MASK(0) once cros_ec driver can send the correct version. + */ DECLARE_HOST_COMMAND(EC_CMD_FLASH_PROTECT, flash_command_protect, - EC_VER_MASK(1)); + EC_VER_MASK(0) | EC_VER_MASK(1)); static int flash_command_region_info(struct host_cmd_handler_args *args) { -- cgit v1.2.1