summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@intel.com>2022-03-02 18:58:33 +0300
committerjmbills <jasonm.bills@yahoo.com>2022-03-11 00:27:19 +0300
commit246e36dba646e1fc5176e536bf9e80b2a3a6ba5f (patch)
tree048af9d31dc3be4ebf1f102f27264947b4573d6a /include/linux
parentf99c8aa5142aaa83cb19aaacf2166dafbb3828aa (diff)
downloadlinux-246e36dba646e1fc5176e536bf9e80b2a3a6ba5f.tar.xz
peci: add msg_len to peci_command
To support the new domain ID, we need to include an extra byte from userspace. This adds a length to the peci_command function so we can detect when the domain ID is sent from userspace. Signed-off-by: Jason M. Bills <jason.m.bills@intel.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/intel-peci-client.h4
-rw-r--r--include/linux/peci.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/mfd/intel-peci-client.h b/include/linux/mfd/intel-peci-client.h
index 31b869e058b7..79b6c94bc153 100644
--- a/include/linux/mfd/intel-peci-client.h
+++ b/include/linux/mfd/intel-peci-client.h
@@ -115,7 +115,7 @@ peci_client_read_package_config(struct peci_client_manager *priv,
msg.param = param;
msg.rx_len = 4;
- ret = peci_command(priv->client->adapter, PECI_CMD_RD_PKG_CFG, &msg);
+ ret = peci_command(priv->client->adapter, PECI_CMD_RD_PKG_CFG, sizeof(msg), &msg);
if (msg.cc != PECI_DEV_CC_SUCCESS)
ret = -EAGAIN;
if (ret)
@@ -149,7 +149,7 @@ peci_client_write_package_config(struct peci_client_manager *priv,
msg.tx_len = 4u;
msg.value = data;
- ret = peci_command(priv->client->adapter, PECI_CMD_WR_PKG_CFG, &msg);
+ ret = peci_command(priv->client->adapter, PECI_CMD_WR_PKG_CFG, sizeof(msg), &msg);
if (!ret) {
if (msg.cc != PECI_DEV_CC_SUCCESS)
ret = -EAGAIN;
diff --git a/include/linux/peci.h b/include/linux/peci.h
index 45cb77d1913c..5a707bbeb66d 100644
--- a/include/linux/peci.h
+++ b/include/linux/peci.h
@@ -145,7 +145,7 @@ struct peci_adapter *peci_verify_adapter(struct device *dev);
int peci_for_each_dev(void *data, int (*fn)(struct device *, void *));
struct peci_xfer_msg *peci_get_xfer_msg(u8 tx_len, u8 rx_len);
void peci_put_xfer_msg(struct peci_xfer_msg *msg);
-int peci_command(struct peci_adapter *adpater, enum peci_cmd cmd, void *vmsg);
+int peci_command(struct peci_adapter *adpater, enum peci_cmd cmd, uint msg_len, void *vmsg);
int peci_get_cpu_id(struct peci_adapter *adapter, u8 addr, u32 *cpu_id);
#endif /* __LINUX_PECI_H */