提交 e308488d 编写于 作者: T Tzung-Bi Shih 提交者: Zheng Zengkai

platform/chrome: cros_ec_proto: don't show MKBP version if unsupported

stable inclusion
from stable-v5.10.138
commit 0a0da5ef5b4e92324fdbd2d0c24d24a79d2f87f4
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60QFD

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0a0da5ef5b4e92324fdbd2d0c24d24a79d2f87f4

--------------------------------

[ Upstream commit b36f0643 ]

It wrongly showed the following message when it doesn't support MKBP:
"MKBP support version 4294967295".

Fix it.
Reviewed-by: NGuenter Roeck <groeck@chromium.org>
Signed-off-by: NTzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20220609084957.3684698-14-tzungbi@kernel.orgSigned-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
上级 8683d4b1
...@@ -507,13 +507,13 @@ int cros_ec_query_all(struct cros_ec_device *ec_dev) ...@@ -507,13 +507,13 @@ int cros_ec_query_all(struct cros_ec_device *ec_dev)
ret = cros_ec_get_host_command_version_mask(ec_dev, ret = cros_ec_get_host_command_version_mask(ec_dev,
EC_CMD_GET_NEXT_EVENT, EC_CMD_GET_NEXT_EVENT,
&ver_mask); &ver_mask);
if (ret < 0 || ver_mask == 0) if (ret < 0 || ver_mask == 0) {
ec_dev->mkbp_event_supported = 0; ec_dev->mkbp_event_supported = 0;
else } else {
ec_dev->mkbp_event_supported = fls(ver_mask); ec_dev->mkbp_event_supported = fls(ver_mask);
dev_dbg(ec_dev->dev, "MKBP support version %u\n", dev_dbg(ec_dev->dev, "MKBP support version %u\n", ec_dev->mkbp_event_supported - 1);
ec_dev->mkbp_event_supported - 1); }
/* Probe if host sleep v1 is supported for S0ix failure detection. */ /* Probe if host sleep v1 is supported for S0ix failure detection. */
ret = cros_ec_get_host_command_version_mask(ec_dev, ret = cros_ec_get_host_command_version_mask(ec_dev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册