diff options
author | Mary Ruthven <mruthven@chromium.org> | 2019-10-30 16:42:10 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-07 22:52:10 +0000 |
commit | 6405df6102e1adc981bd497a4d8987ce921a8945 (patch) | |
tree | 5cb579569a53cea949bf4ba06caeb32bcce29203 /chip/g/board_id.c | |
parent | 69fef6d57b29e74839885b20b1f83f1a925f8104 (diff) | |
download | chrome-ec-6405df6102e1adc981bd497a4d8987ce921a8945.tar.gz |
board_id: change the vc to allow setting only flags
If the board id type is 0xffffffff, hold off on erasing any type_inv
bits until we get a type that isn't empty.
BUG=b:143649068
BRANCH=cr50
TEST=Use gsctool -i 0xffffffff:0x3f80 to set flags to 0x3f80. Get the
board id and make sure the rlz and rlz_inv fields are still 0xffffffff.
Change-Id: I8243cb59f2560dc232bb982e1615271136d60f24
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1892118
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'chip/g/board_id.c')
-rw-r--r-- | chip/g/board_id.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chip/g/board_id.c b/chip/g/board_id.c index 15a8f54376..e816720fb9 100644 --- a/chip/g/board_id.c +++ b/chip/g/board_id.c @@ -192,7 +192,10 @@ static enum vendor_cmd_rc vc_set_board_id(enum vendor_cmd_cc code, memcpy(&id.type, pbuf, sizeof(id.type)); id.type = be32toh(id.type); - id.type_inv = ~id.type; + if (id.type == BLANK_FIELD) + id.type_inv = BLANK_FIELD; + else + id.type_inv = ~id.type; memcpy(&id.flags, pbuf + sizeof(id.type), sizeof(id.flags)); id.flags = be32toh(id.flags); |