diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2013-06-20 13:23:38 -0700 |
---|---|---|
committer | Katie Roberts-Hoffman <katierh@chromium.org> | 2013-06-20 14:02:21 -0700 |
commit | 477460cc4fe3678151ae5874d300ef5f5785e8c1 (patch) | |
tree | 15345be6bb7a77f7eddee08731c5004ded2fd7da | |
parent | 5faf6d7c15c96f6ea0e96e60ed100e07ca38625e (diff) | |
download | chrome-ec-477460cc4fe3678151ae5874d300ef5f5785e8c1.tar.gz |
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 <vbendeb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/59464
Commit-Queue: Katie Roberts-Hoffman <katierh@chromium.org>
Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org>
Tested-by: Katie Roberts-Hoffman <katierh@chromium.org>
-rw-r--r-- | common/flash_common.c | 8 |
1 files changed, 7 insertions, 1 deletions
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) { |