]> www.infradead.org Git - users/hch/configfs.git/commitdiff
platform/chrome: cros_ec_debugfs: fix wrong EC message version
authorTzung-Bi Shih <tzungbi@kernel.org>
Tue, 11 Jun 2024 11:31:10 +0000 (11:31 +0000)
committerTzung-Bi Shih <tzungbi@kernel.org>
Wed, 12 Jun 2024 02:28:39 +0000 (02:28 +0000)
ec_read_version_supported() uses ec_params_get_cmd_versions_v1 but it
wrongly uses message version 0.

Fix it.

Fixes: e86264595225 ("mfd: cros_ec: add debugfs, console log file")
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20240611113110.16955-1-tzungbi@kernel.org
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
drivers/platform/chrome/cros_ec_debugfs.c

index f0e9efb543df6ce2a3137992b82ea63a76877bfa..4525ad1b59f44856aba00ebc39fa2d9f6465f8a6 100644 (file)
@@ -334,6 +334,7 @@ static int ec_read_version_supported(struct cros_ec_dev *ec)
        if (!msg)
                return 0;
 
+       msg->version = 1;
        msg->command = EC_CMD_GET_CMD_VERSIONS + ec->cmd_offset;
        msg->outsize = sizeof(*params);
        msg->insize = sizeof(*response);