From 042c8774bf063eb01f5b836490b6e0961ea2e072 Mon Sep 17 00:00:00 2001 From: Tim Wawrzynczak Date: Fri, 17 Jan 2020 13:48:01 -0700 Subject: ectool: Fix ectool motionsense info command Commit 267da3cfc increased the response size of the motionsense "info" command implicitly by adding a new version of the command. ectool explicitly gets the latest version of the command to use, and the kernel was complaining because it only requested 16 bytes, but the new version sends back 19. Hence, update the expected size of the response to compensate for this. BUG=b:147472780, b:147720232 BRANCH=firmware-hatch-12672.B TEST=ectool motionsense info X now returns data instead of failing Change-Id: Ib297c02f55406b4dc3b8bb0b6b0843165b350995 Signed-off-by: Tim Wawrzynczak Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2007897 Reviewed-by: Jack Rosenthal Reviewed-by: Evan Green (cherry picked from commit c520344abe270967b1bd96d43559fb00c0d431d4) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2009524 Reviewed-by: Philip Chen Commit-Queue: Philip Chen Tested-by: Philip Chen --- util/ectool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/ectool.c b/util/ectool.c index 32ebe478e9..90ed0ae435 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -4469,7 +4469,7 @@ static const struct { sizeof(struct ec_response_motion_sensor_data) * ECTOOL_MAX_SENSOR }, - ST_BOTH_SIZES(info_3), + { ST_PRM_SIZE(info_3), ST_RSP_SIZE(info_4) }, ST_BOTH_SIZES(ec_rate), ST_BOTH_SIZES(sensor_odr), ST_BOTH_SIZES(sensor_range), -- cgit v1.2.1